summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-cui.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-04-15 11:48:00 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-04-16 09:08:45 +0800
commita1fb38f17bfa60aac89d0dd21dd8ccc739d794bf (patch)
tree4930394c42ed0bd505361e379bee264db1da4a30 /ui/ncurses/nc-cui.c
parent5171b1c54fc57b6f1963e2482cfc07587296100d (diff)
downloadtalos-petitboot-a1fb38f17bfa60aac89d0dd21dd8ccc739d794bf.tar.gz
talos-petitboot-a1fb38f17bfa60aac89d0dd21dd8ccc739d794bf.zip
ui/ncurses: Always provide a key definition for backtab
Petitboot environments will probably want a basic terminfo defintion (eg, vt220) rather than a full linux or xterm, but vt220 and friends don't define a backtab key. Backtab can be useful for proper form navigation, and without a key definition, we just get an escape, which exits the current screen. This change provides a static definition for KEY_BTAB, so we should always have one available. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'ui/ncurses/nc-cui.c')
-rw-r--r--ui/ncurses/nc-cui.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/ncurses/nc-cui.c b/ui/ncurses/nc-cui.c
index 18604c9..5f56409 100644
--- a/ui/ncurses/nc-cui.c
+++ b/ui/ncurses/nc-cui.c
@@ -58,6 +58,11 @@ static void cui_start(void)
define_key("\x7f", KEY_BACKSPACE);
define_key("\x08", KEY_BACKSPACE);
+ /* we need backtab too, for form navigation. vt220 doesn't include
+ * this (kcbt), but we don't want to require a full linux/xterm termcap
+ */
+ define_key("\x1b[Z", KEY_BTAB);
+
while (getch() != ERR) /* flush stdin */
(void)0;
}
OpenPOWER on IntegriCloud