aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-01-09 17:08:40 +0000
committerMatt Fleming <matt.fleming@intel.com>2013-01-09 17:21:29 +0000
commite394bc5e14d6e0d588178bf4a78f942acd423135 (patch)
treec9b32822545132761e2bb82ac3d5b73bb0ff8756 /com32/elflink
parenta90d4b73e7b487b6a907edecea36af735b6ef512 (diff)
downloadsyslinux-e394bc5e14d6e0d588178bf4a78f942acd423135.tar.gz
syslinux-e394bc5e14d6e0d588178bf4a78f942acd423135.tar.xz
syslinux-e394bc5e14d6e0d588178bf4a78f942acd423135.zip
efi: Greatly simplify the EFI Scan Code handling
By adding the EFI Scan Codes to 'keycodes' in get_key.c, prefixed with the escape sequence '\0' to avoid clashes with ASCII characters, we can have all the input key decoding done in one place, allowing us to delete efi/keymap.h. Luckily there are no conflicts with the combined BIOS codes already present in 'keycodes', though if we were to add the EFI scan code for the pause key (0x48) that would conflict with the existing BIOS code for KEY_UP. Still, it shouldn't be necessary to add any more scan codes because it doesn't make sense for things like the mute key to be handled by Syslinux. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/elflink')
-rw-r--r--com32/elflink/ldlinux/get_key.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/com32/elflink/ldlinux/get_key.c b/com32/elflink/ldlinux/get_key.c
index cece0f81..6cba1244 100644
--- a/com32/elflink/ldlinux/get_key.c
+++ b/com32/elflink/ldlinux/get_key.c
@@ -112,6 +112,31 @@ static const struct keycode keycodes[] = {
CODE(KEY_INSERT, "\033[2~"),
CODE(KEY_INSERT, "\033[@"),
CODE(KEY_DELETE, "\033[3~"),
+
+ /* EFI scan codes */
+ CODE(KEY_UP, "\0\x01"),
+ CODE(KEY_DOWN, "\0\x02"),
+ CODE(KEY_RIGHT, "\0\x03"),
+ CODE(KEY_LEFT, "\0\x04"),
+ CODE(KEY_HOME, "\0\x05"),
+ CODE(KEY_END, "\0\x06"),
+ CODE(KEY_INSERT, "\0\x07"),
+ CODE(KEY_DELETE, "\0\x08"),
+ CODE(KEY_PGUP, "\0\x09"),
+ CODE(KEY_PGDN, "\0\x0a"),
+ CODE(KEY_F1, "\0\x0b"),
+ CODE(KEY_F2, "\0\x0c"),
+ CODE(KEY_F3, "\0\x0d"),
+ CODE(KEY_F4, "\0\x0e"),
+ CODE(KEY_F5, "\0\x0f"),
+ CODE(KEY_F6, "\0\x10"),
+ CODE(KEY_F7, "\0\x11"),
+ CODE(KEY_F8, "\0\x12"),
+ CODE(KEY_F9, "\0\x13"),
+ CODE(KEY_F10, "\0\x14"),
+ CODE(KEY_F11, "\0\x15"),
+ CODE(KEY_F12, "\0\x16"),
+ CODE(KEY_ESC, "\0\x17"),
};
#define NCODES ((int)(sizeof keycodes/sizeof(struct keycode)))