aboutsummaryrefslogtreecommitdiff
path: root/input-keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'input-keys.c')
-rw-r--r--input-keys.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/input-keys.c b/input-keys.c
index 0b618407..ae67b486 100644
--- a/input-keys.c
+++ b/input-keys.c
@@ -418,7 +418,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;
@@ -519,7 +519,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;