summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/lxdialog/yesno.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/lxdialog/yesno.c')
-rw-r--r--scripts/kconfig/lxdialog/yesno.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/kconfig/lxdialog/yesno.c b/scripts/kconfig/lxdialog/yesno.c
index 9fc24492c52..8364f9dd01c 100644
--- a/scripts/kconfig/lxdialog/yesno.c
+++ b/scripts/kconfig/lxdialog/yesno.c
@@ -69,7 +69,7 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width)
print_buttons(dialog, height, width, 0);
- while (key != ESC) {
+ while (key != KEY_ESC) {
key = wgetch(dialog);
switch (key) {
case 'Y':
@@ -93,11 +93,12 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width)
case '\n':
delwin(dialog);
return button;
- case ESC:
+ case KEY_ESC:
+ key = on_key_esc(dialog);
break;
}
}
delwin(dialog);
- return 255; /* ESC pressed */
+ return key; /* ESC pressed */
}