mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Ctrl-PgUp and Ctrl-PgDn now scroll by one line on Unix and Windows
[originally from svn r2582]
This commit is contained in:
parent
527c081a2e
commit
5c7bc54022
@ -483,10 +483,18 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
||||
term_scroll(inst->term, 0, -inst->cfg.height/2);
|
||||
return TRUE;
|
||||
}
|
||||
if (event->keyval == GDK_Page_Up && (event->state & GDK_CONTROL_MASK)) {
|
||||
term_scroll(inst->term, 0, -1);
|
||||
return TRUE;
|
||||
}
|
||||
if (event->keyval == GDK_Page_Down && (event->state & GDK_SHIFT_MASK)) {
|
||||
term_scroll(inst->term, 0, +inst->cfg.height/2);
|
||||
return TRUE;
|
||||
}
|
||||
if (event->keyval == GDK_Page_Down && (event->state & GDK_CONTROL_MASK)) {
|
||||
term_scroll(inst->term, 0, +1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Neither does Shift-Ins.
|
||||
|
8
window.c
8
window.c
@ -3290,10 +3290,18 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
|
||||
SendMessage(hwnd, WM_VSCROLL, SB_PAGEUP, 0);
|
||||
return 0;
|
||||
}
|
||||
if (wParam == VK_PRIOR && shift_state == 2) {
|
||||
SendMessage(hwnd, WM_VSCROLL, SB_LINEUP, 0);
|
||||
return 0;
|
||||
}
|
||||
if (wParam == VK_NEXT && shift_state == 1) {
|
||||
SendMessage(hwnd, WM_VSCROLL, SB_PAGEDOWN, 0);
|
||||
return 0;
|
||||
}
|
||||
if (wParam == VK_NEXT && shift_state == 2) {
|
||||
SendMessage(hwnd, WM_VSCROLL, SB_LINEDOWN, 0);
|
||||
return 0;
|
||||
}
|
||||
if (wParam == VK_INSERT && shift_state == 1) {
|
||||
term_do_paste(term);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user