aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2019-11-18 09:42:09 +0000
committernicm <nicm>2019-11-18 09:42:09 +0000
commit4bc445f080ff53268ff1af26564d19c35c17e980 (patch)
tree59b9d6127a10b4326d6009f10660623ff37adc33
parent5dfe9db78820aedd5d4dfe60728e871f935bff36 (diff)
downloadrtmux-4bc445f080ff53268ff1af26564d19c35c17e980.tar.gz
rtmux-4bc445f080ff53268ff1af26564d19c35c17e980.tar.bz2
rtmux-4bc445f080ff53268ff1af26564d19c35c17e980.zip
Keep modifiers on backspace when translating it.
-rw-r--r--input-keys.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/input-keys.c b/input-keys.c
index 1325e813..01f9ad9d 100644
--- a/input-keys.c
+++ b/input-keys.c
@@ -157,7 +157,7 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m)
u_int i;
size_t dlen;
char *out;
- key_code justkey;
+ key_code justkey, newkey;
struct utf8_data ud;
log_debug("writing key 0x%llx (%s) to %%%u", key,
@@ -179,9 +179,10 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m)
/* Is this backspace? */
if ((key & KEYC_MASK_KEY) == KEYC_BSPACE) {
- key = options_get_number(global_options, "backspace");
- if (key >= 0x7f)
- key = '\177';
+ newkey = options_get_number(global_options, "backspace");
+ if (newkey >= 0x7f)
+ newkey = '\177';
+ key = newkey|(key & KEYC_MASK_MOD);
}
/*