mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Fix handling of shifted SCO function keys.
A user points out that this has regressed since 0.76, probably when I reorganised the keyboard control-sequence formatting into centralised helper functions in terminal.c. The SCO function keys should behave differently when you press Shift or Ctrl or both. For example, F1 should generate ESC[M bare, ESC[Y with Shift, Esc[k with Ctrl, Esc[w with Shift+Ctrl. But in fact, Shift was having no effect, so those tests would give ESC[M twice and ESC[k twice. That was because I was setting 'shift = false' for all function key types except FUNKY_XTERM_216, after modifying the derived 'index' value. But the SCO branch of the code doesn't use 'index' (it wouldn't have the right value in any case), so the sole effect was to forget about Shift. Easily fixed by disabling that branch for FUNKY_SCO too. (cherry picked from commit aa01530488e0b693172b513836fa6881d387ea8a)
This commit is contained in:
parent
9427f9699d
commit
445f9de129
@ -7373,7 +7373,7 @@ int format_function_key(char *buf, Terminal *term, int key_number,
|
|||||||
assert(key_number < lenof(key_number_to_tilde_code));
|
assert(key_number < lenof(key_number_to_tilde_code));
|
||||||
|
|
||||||
int index = key_number;
|
int index = key_number;
|
||||||
if (term->funky_type != FUNKY_XTERM_216) {
|
if (term->funky_type != FUNKY_XTERM_216 && term->funky_type != FUNKY_SCO) {
|
||||||
if (shift && index <= 10) {
|
if (shift && index <= 10) {
|
||||||
shift = false;
|
shift = false;
|
||||||
index += 10;
|
index += 10;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user