aboutsummaryrefslogtreecommitdiff
path: root/input-keys.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-11-14 10:01:29 +0000
committerThomas Adam <thomas@xteddy.org>2019-11-14 10:01:29 +0000
commit518a687886456baeb397bdc751beb1ad682a3e6a (patch)
tree1a4952dcc110966800798961992f00b7553ac9d8 /input-keys.c
parenteb215d3d3fc6a55245cfbad77613129c06f6ff3c (diff)
parent2dbf062a891e992b438a0923b9ffd79638014872 (diff)
downloadrtmux-518a687886456baeb397bdc751beb1ad682a3e6a.tar.gz
rtmux-518a687886456baeb397bdc751beb1ad682a3e6a.tar.bz2
rtmux-518a687886456baeb397bdc751beb1ad682a3e6a.zip
Merge branch 'obsd-master'
Diffstat (limited to 'input-keys.c')
-rw-r--r--input-keys.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/input-keys.c b/input-keys.c
index 9e47a553..9a00ebef 100644
--- a/input-keys.c
+++ b/input-keys.c
@@ -42,9 +42,6 @@ struct input_key_ent {
};
static const struct input_key_ent input_keys[] = {
- /* Backspace key. */
- { KEYC_BSPACE, "\177", 0 },
-
/* Paste keys. */
{ KEYC_PASTE_START, "\033[200~", 0 },
{ KEYC_PASTE_END, "\033[201~", 0 },
@@ -179,6 +176,13 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m)
return;
}
+ /* Is this backspace? */
+ if ((key & KEYC_MASK_KEY) == KEYC_BSPACE) {
+ key = options_get_number(global_options, "backspace");
+ if (key >= 0x7f)
+ key = '\177';
+ }
+
/*
* If this is a normal 7-bit key, just send it, with a leading escape
* if necessary. If it is a UTF-8 key, split it and send it.