aboutsummaryrefslogtreecommitdiffstats
path: root/com32/cmenu/adv_menu.tpl
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-05 22:51:04 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-05 22:51:04 -0700
commit843f0ef16067d920e9e181ef897abbaa4a432da9 (patch)
tree861c3a353967955cfe325ed489c4429d52a63f64 /com32/cmenu/adv_menu.tpl
parent71fb86d8596fb12a6ddf1d182116044406b2b8ca (diff)
downloadsyslinux-843f0ef16067d920e9e181ef897abbaa4a432da9.tar.gz
syslinux-843f0ef16067d920e9e181ef897abbaa4a432da9.tar.xz
syslinux-843f0ef16067d920e9e181ef897abbaa4a432da9.zip
cmenu: use get_key library for keyboard functions
Syslinux already uses a get_key library to handle stdin. Let's leverage it. cmenu now works over serial completely. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/cmenu/adv_menu.tpl')
-rw-r--r--com32/cmenu/adv_menu.tpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/com32/cmenu/adv_menu.tpl b/com32/cmenu/adv_menu.tpl
index 22932fcb..9c38407b 100644
--- a/com32/cmenu/adv_menu.tpl
+++ b/com32/cmenu/adv_menu.tpl
@@ -203,13 +203,13 @@ void keys_handler(t_menuitem *mi,unsigned int scancode)
nr = 24;
}
- if ( ((scancode >> 8) == F1) && (mi->helpid != 0xFFFF) ) { // If scancode of F1 and non-trivial helpid
+ if ( (scancode == KEY_F1) && (mi->helpid != 0xFFFF) ) { // If scancode of F1 and non-trivial helpid
runhelpsystem(mi->helpid);
}
// If user hit TAB, and item is an "executable" item
// and user has privileges to edit it, edit it in place.
- if (((scancode & 0xFF) == 0x09) && (mi->action == OPT_RUN) &&
+ if ((scancode == KEY_TAB) && (mi->action == OPT_RUN) &&
(EDIT_ROW < nr) && (EDIT_ROW > 0) &&
(isallowed(username,"editcmd") || isallowed(username,"root"))) {
// User typed TAB and has permissions to edit command line