summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/lxdialog/textbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/lxdialog/textbox.c')
-rw-r--r--scripts/kconfig/lxdialog/textbox.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c
index 86b0770b0387..a99e1f497d67 100644
--- a/scripts/kconfig/lxdialog/textbox.c
+++ b/scripts/kconfig/lxdialog/textbox.c
@@ -92,7 +92,7 @@ int dialog_textbox(const char *title, const char *tbuf, int height, int width)
wmove(dialog, cur_y, cur_x); /* Restore cursor position */
wrefresh(dialog);
- while ((key != ESC) && (key != '\n')) {
+ while ((key != KEY_ESC) && (key != '\n')) {
key = wgetch(dialog);
switch (key) {
case 'E': /* Exit */
@@ -228,13 +228,14 @@ int dialog_textbox(const char *title, const char *tbuf, int height, int width)
wmove(dialog, cur_y, cur_x);
wrefresh(dialog);
break;
- case ESC:
+ case KEY_ESC:
+ key = on_key_esc(dialog);
break;
}
}
delwin(text);
delwin(dialog);
- return 255; /* ESC pressed */
+ return key; /* ESC pressed */
}
/*
OpenPOWER on IntegriCloud