diff options
author | 2009-07-26 21:42:08 +0000 | |
---|---|---|
committer | 2009-07-26 21:42:08 +0000 | |
commit | 4cf013256f8388b45535dda81c15c71050dad7f6 (patch) | |
tree | 6a86486ae39b7772a758c0619a861b7e0ad4a8d7 /usr.bin/tmux/input-keys.c | |
parent | stop trying to fast-recycle pages for now. a few bugs have been found and (diff) | |
download | wireguard-openbsd-4cf013256f8388b45535dda81c15c71050dad7f6.tar.xz wireguard-openbsd-4cf013256f8388b45535dda81c15c71050dad7f6.zip |
Detect backspace by looking at termios VERASE and translate it into \177 (which
matches screen's behaviour if not its termcap/terminfo entry). The terminfo kbs
cap is often wrong or missing so it can't be used, and just assuming \177 may
be wrong.
Diffstat (limited to 'usr.bin/tmux/input-keys.c')
-rw-r--r-- | usr.bin/tmux/input-keys.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/input-keys.c b/usr.bin/tmux/input-keys.c index 0e54ccf6673..5fa4640c98b 100644 --- a/usr.bin/tmux/input-keys.c +++ b/usr.bin/tmux/input-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input-keys.c,v 1.2 2009/07/21 17:57:29 nicm Exp $ */ +/* $OpenBSD: input-keys.c,v 1.3 2009/07/26 21:42:08 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -36,6 +36,9 @@ struct input_key_ent { }; struct input_key_ent input_keys[] = { + /* Backspace key. */ + { KEYC_BSPACE, "\177", 0 }, + /* Function keys. */ { KEYC_F1, "\033OP", INPUTKEY_CTRL|INPUTKEY_XTERM }, { KEYC_F2, "\033OQ", INPUTKEY_CTRL|INPUTKEY_XTERM }, |