diff options
author | Michael Brown <mcb30@ipxe.org> | 2022-02-14 13:45:59 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2022-02-15 12:50:26 +0000 |
commit | e1cedbc0d4fdb0e16818f6b722f4873a50780761 (patch) | |
tree | 498de03ad0d5157c73479274569ea992cb47101c /src/hci/keymap/keymap_it.c | |
parent | f2a59d5973da2041f93264609698b9b3f4ec101b (diff) | |
download | ipxe-e1cedbc0d4fdb0e16818f6b722f4873a50780761.tar.gz |
[console] Support AltGr to access ASCII characters via remapping
Several keyboard layouts define ASCII characters as accessible only
via the AltGr modifier. Add support for this modifier to ensure that
all ASCII characters are accessible.
Experiments suggest that the BIOS console is likely to fail to
generate ASCII characters when the AltGr key is pressed. Work around
this limitation by accepting LShift+RShift (which will definitely
produce an ASCII character) as a synonym for AltGr.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci/keymap/keymap_it.c')
-rw-r--r-- | src/hci/keymap/keymap_it.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/hci/keymap/keymap_it.c b/src/hci/keymap/keymap_it.c index a4921020a..f67bbadcb 100644 --- a/src/hci/keymap/keymap_it.c +++ b/src/hci/keymap/keymap_it.c @@ -35,8 +35,20 @@ static struct keymap_key it_basic[] = { { 0, 0 } }; +/** "it" AltGr remapping */ +static struct keymap_key it_altgr[] = { + { 0x2d, 0x60 }, /* '-' => '`' */ + { 0x30, 0x7d }, /* '0' => '}' */ + { 0x39, 0x5d }, /* '9' => ']' */ + { 0x3b, 0x40 }, /* ';' => '@' */ + { 0x3d, 0x7e }, /* '=' => '~' */ + { 0x71, 0x40 }, /* 'q' => '@' */ + { 0, 0 } +}; + /** "it" keyboard map */ struct keymap it_keymap __keymap = { .name = "it", .basic = it_basic, + .altgr = it_altgr, }; |