summaryrefslogtreecommitdiff
path: root/scripts/kconfig/lxdialog/inputbox.c
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@gmail.com>2019-03-25 18:16:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-16 20:44:59 +0300
commite0d9031feb2f899705f64b2f1c2de7926cee33cc (patch)
tree8e825769a51fb79b5b2f47a41e2076208d2d91e5 /scripts/kconfig/lxdialog/inputbox.c
parent8c2bbe210936f22ea5796d97431f61de439cd7ce (diff)
downloadlinux-e0d9031feb2f899705f64b2f1c2de7926cee33cc.tar.xz
kconfig/[mn]conf: handle backspace (^H) key
[ Upstream commit 9c38f1f044080392603c497ecca4d7d09876ff99 ] Backspace is not working on some terminal emulators which do not send the key code defined by terminfo. Terminals either send '^H' (8) or '^?' (127). But currently only '^?' is handled. Let's also handle '^H' for those terminals. Signed-off-by: Changbin Du <changbin.du@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
Diffstat (limited to 'scripts/kconfig/lxdialog/inputbox.c')
-rw-r--r--scripts/kconfig/lxdialog/inputbox.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c
index d58de1dc5360..510049a7bd1d 100644
--- a/scripts/kconfig/lxdialog/inputbox.c
+++ b/scripts/kconfig/lxdialog/inputbox.c
@@ -126,7 +126,8 @@ do_resize:
case KEY_DOWN:
break;
case KEY_BACKSPACE:
- case 127:
+ case 8: /* ^H */
+ case 127: /* ^? */
if (pos) {
wattrset(dialog, dlg.inputbox.atr);
if (input_x == 0) {