Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2022-02-10 21:51:19 +0300
committerSimon Tatham <anakin@pobox.com>2022-02-11 23:03:31 +0300
commit445f9de1297e408b9ca08f231873e312eb2222d4 (patch)
treef7dd9eef37e5018d3f2a73bed882496c1867f5ea /terminal
parent9427f9699d1072f4598753e77681b3a8b59a48a7 (diff)
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)
Diffstat (limited to 'terminal')
-rw-r--r--terminal/terminal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/terminal/terminal.c b/terminal/terminal.c
index 3398cd59..923ed03e 100644
--- a/terminal/terminal.c
+++ b/terminal/terminal.c
@@ -7373,7 +7373,7 @@ int format_function_key(char *buf, Terminal *term, int key_number,
assert(key_number < lenof(key_number_to_tilde_code));
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) {
shift = false;
index += 10;