aboutsummaryrefslogtreecommitdiffstats
path: root/src/hci/keymap/keymap_no-latin1.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2022-02-09 15:43:42 +0000
committerMichael Brown <mcb30@ipxe.org>2022-02-10 13:59:32 +0000
commit0bbd8967830097b9141945ba960e90339c230ccb (patch)
treeeca6637c24625b3ca50663d8f5e833f6e4f009b5 /src/hci/keymap/keymap_no-latin1.c
parent3f05a82fec6223a49df300a9cbf80c6245c3f99e (diff)
downloadipxe-0bbd8967830097b9141945ba960e90339c230ccb.tar.gz
[console] Handle remapping of scancode 86
The key with scancode 86 appears in the position between left shift and Z on a US keyboard, where it typically fails to exist entirely. Most US keyboard maps define this nonexistent key as generating "\|", with the notable exception of "loadkeys" which instead reports it as generating "<>". Both of these mapping choices duplicate keys that exist elsewhere in the map, which causes problems for our ASCII-based remapping mechanism. Work around these quirks by treating the key as generating "\|" with the high bit set, and making it subject to remapping. Where the BIOS generates "\|" as expected, this allows us to remap to the correct ASCII value. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci/keymap/keymap_no-latin1.c')
-rw-r--r--src/hci/keymap/keymap_no-latin1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hci/keymap/keymap_no-latin1.c b/src/hci/keymap/keymap_no-latin1.c
index 655e4cef7..d5a721a90 100644
--- a/src/hci/keymap/keymap_no-latin1.c
+++ b/src/hci/keymap/keymap_no-latin1.c
@@ -32,4 +32,6 @@ struct key_mapping no_latin1_mapping[] __keymap = {
{ 0x60, 0x7c }, /* '`' => '|' */
{ 0x7c, 0x2a }, /* '|' => '*' */
{ 0x7d, 0x5e }, /* '}' => '^' */
+ { 0xdc, 0x3c }, /* Pseudo-'\\' => '<' */
+ { 0xfc, 0x3e }, /* Pseudo-'|' => '>' */
};