summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2022-02-28 10:01:11 +0000
committerThomas Adam <thomas@xteddy.org>2022-02-28 10:01:11 +0000
commit27501957099977ebd642e17a0d5a15d10f6ab8ce (patch)
treeeacee3a1793456b37b2c76af962e61aa47a63c2b
parent60688afe9ce31b8ee9dc3339d4e06bf12e6391fe (diff)
parent2e59ff2db95d573f56237776a10314b412721491 (diff)
Merge branch 'obsd-master' into master
-rw-r--r--input-keys.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/input-keys.c b/input-keys.c
index 47614aa0..f478cb95 100644
--- a/input-keys.c
+++ b/input-keys.c
@@ -417,7 +417,7 @@ int
input_key(struct screen *s, struct bufferevent *bev, key_code key)
{
struct input_key_entry *ike;
- key_code justkey, newkey, outkey;
+ key_code justkey, newkey, outkey, modifiers;
struct utf8_data ud;
char tmp[64], modifier;
@@ -518,7 +518,12 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key)
return (input_key(s, bev, key & ~KEYC_CTRL));
}
outkey = (key & KEYC_MASK_KEY);
- switch (key & KEYC_MASK_MODIFIERS) {
+ modifiers = (key & KEYC_MASK_MODIFIERS);
+ if (outkey < ' ') {
+ outkey = 64 + outkey;
+ modifiers |= KEYC_CTRL;
+ }
+ switch (modifiers) {
case KEYC_SHIFT:
modifier = '2';
break;