diff mbox

kconfig/mconf: fix handling of BACKSPACE key

Message ID 201406042142.s54LgTXP023690@pogo.cesa.opbu.xerox.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Klossner June 4, 2014, 7:54 p.m. UTC
Some ancient terminals send control-H (decimal 8) when the BACKSPACE key is
pressed.  In "make menuconfig", an input box discards the keystroke.  Change
it to treat BACKSPACE in the same way as the DELETE key (or, as old-timers
call it, the RUBOUT key.)

Signed-off-by: Andrew Klossner <Andrew.Klossner@3dsystems.com>
---
 scripts/kconfig/lxdialog/inputbox.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c
index 447a582..60cddd2 100644
--- a/scripts/kconfig/lxdialog/inputbox.c
+++ b/scripts/kconfig/lxdialog/inputbox.c
@@ -127,6 +127,7 @@  do_resize:
 				break;
 			case KEY_BACKSPACE:
 			case 127:
+			case 8: /* Backspace on old terminals sends control-H */
 				if (pos) {
 					wattrset(dialog, dlg.inputbox.atr);
 					if (input_x == 0) {