diff options
author | Thomas Adam <thomas@xteddy.org> | 2019-11-18 10:01:25 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2019-11-18 10:01:25 +0000 |
commit | 0d3f306c8e00465e5ffa7b31b99645c9c3c90c3f (patch) | |
tree | ae5108dc89d336423f5740073fa77070b0d7ed65 /input-keys.c | |
parent | dbdff241b2f01c18cced24833f2acf56a117e72a (diff) | |
parent | 350a43493952e1f10173b4e341ff1fbd8ed8440d (diff) | |
download | rtmux-0d3f306c8e00465e5ffa7b31b99645c9c3c90c3f.tar.gz rtmux-0d3f306c8e00465e5ffa7b31b99645c9c3c90c3f.tar.bz2 rtmux-0d3f306c8e00465e5ffa7b31b99645c9c3c90c3f.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'input-keys.c')
-rw-r--r-- | input-keys.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/input-keys.c b/input-keys.c index 9a00ebef..b0ea5104 100644 --- a/input-keys.c +++ b/input-keys.c @@ -156,7 +156,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, @@ -178,9 +178,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); } /* |