diff options
author | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-04-16 11:53:20 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-04-22 10:10:43 +1000 |
commit | 2598810aea74bf2f614d9e7b7cbb7c086a1fdc95 (patch) | |
tree | b6a98ffbd81f0f72afa34cd018a40795dd7a37da /ui | |
parent | 6600e73fe891d5006c34f694e97e37eefceb921d (diff) | |
download | talos-petitboot-2598810aea74bf2f614d9e7b7cbb7c086a1fdc95.tar.gz talos-petitboot-2598810aea74bf2f614d9e7b7cbb7c086a1fdc95.zip |
ui/ncurses: Define Home, End, and Page Up/Down keys
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ncurses/nc-cui.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/ncurses/nc-cui.c b/ui/ncurses/nc-cui.c index 3f1e0a2..8e31fe2 100644 --- a/ui/ncurses/nc-cui.c +++ b/ui/ncurses/nc-cui.c @@ -69,6 +69,16 @@ static void cui_start(void) */ define_key("\x1b[Z", KEY_BTAB); + /* We'll define a few other keys too since they're commonly + * used for navigation but the escape character will cause + * Petitboot to exit if they're left undefined */ + define_key("\x1b\x5b\x35\x7e", KEY_PPAGE); + define_key("\x1b\x5b\x36\x7e", KEY_NPAGE); + define_key("\x1b\x4f\x48", KEY_HOME); + define_key("\x1b\x4f\x46", KEY_END); + define_key("OH", KEY_HOME); + define_key("OF", KEY_END); + while (getch() != ERR) /* flush stdin */ (void)0; } |