mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Fix Alt handling in the new shifted-arrow-key support.
As well as affecting the bitmap field in the escape sequence, it was _also_ having its otherwise standard effect of prefixing Esc to the whole sequence. It shouldn't do both.
This commit is contained in:
@ -4429,6 +4429,8 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
|
||||
}
|
||||
|
||||
switch (wParam) {
|
||||
bool consumed_alt;
|
||||
|
||||
case VK_NUMPAD0: keypad_key = '0'; goto numeric_keypad;
|
||||
case VK_NUMPAD1: keypad_key = '1'; goto numeric_keypad;
|
||||
case VK_NUMPAD2: keypad_key = '2'; goto numeric_keypad;
|
||||
@ -4536,8 +4538,11 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
|
||||
case VK_LEFT: xkey = 'D'; goto arrow_key;
|
||||
case VK_CLEAR: xkey = 'G'; goto arrow_key; /* close enough */
|
||||
arrow_key:
|
||||
consumed_alt = false;
|
||||
p += format_arrow_key((char *)p, term, xkey, shift_state & 1,
|
||||
shift_state & 2, left_alt);
|
||||
shift_state & 2, left_alt, &consumed_alt);
|
||||
if (consumed_alt)
|
||||
left_alt = false; /* supersedes the usual prefixing of Esc */
|
||||
return p - output;
|
||||
|
||||
case VK_RETURN:
|
||||
|
Reference in New Issue
Block a user