1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 01:02:24 +00:00

Bug `shift-backspace': whichever of ^H and ^? is configured for

Backspace, Shift-Backspace should do the _other_ one. Thanks to
Justin Bradford.

[originally from svn r2079]
This commit is contained in:
Simon Tatham 2002-10-16 09:40:36 +00:00
parent e30ab28d34
commit 5bc8f34f58
2 changed files with 12 additions and 0 deletions

View File

@ -472,6 +472,12 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
output[1] = cfg.bksp_is_delete ? '\x7F' : '\x08';
end = 2;
}
/* For Shift Backspace, do opposite of what is configured. */
if (event->keyval == GDK_BackSpace &&
(event->state & GDK_SHIFT_MASK)) {
output[1] = cfg.bksp_is_delete ? '\x08' : '\x7F';
end = 2;
}
/* Shift-Tab is ESC [ Z */
if (event->keyval == GDK_ISO_Left_Tab ||

View File

@ -3404,6 +3404,12 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
*p++ = 0;
return -2;
}
if (wParam == VK_BACK && shift_state == 1) { /* Shift Backspace */
/* We do the opposite of what is configured */
*p++ = (cfg.bksp_is_delete ? 0x08 : 0x7F);
*p++ = 0;
return -2;
}
if (wParam == VK_TAB && shift_state == 1) { /* Shift tab */
*p++ = 0x1B;
*p++ = '[';