diff --git a/window.c b/window.c index e85cb024..a7aeb1fc 100644 --- a/window.c +++ b/window.c @@ -1432,6 +1432,16 @@ static int TranslateKey(WPARAM wParam, LPARAM lParam, unsigned char *output) { } } + /* + * Shift-Tab should send ESC [ Z. + */ + if (ret && (keystate[VK_SHIFT] & 0x80) && wParam == '\t') { + *p++ = 0x1B; /* ESC */ + *p++ = '['; + *p++ = 'Z'; + return p - output; + } + /* * Before doing Windows charmap translation, remove LeftALT * from the keymap, since its sole effect should be to prepend