mirror of
https://github.com/ipxe/ipxe
synced 2025-12-27 01:52:39 +03:00
[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>
This commit is contained in:
@@ -34,8 +34,18 @@ static struct keymap_key pt_basic[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
/** "pt" AltGr remapping */
|
||||
static struct keymap_key pt_altgr[] = {
|
||||
{ 0x32, 0x40 }, /* '2' => '@' */
|
||||
{ 0x37, 0x7b }, /* '7' => '{' */
|
||||
{ 0x38, 0x5b }, /* '8' => '[' */
|
||||
{ 0x71, 0x40 }, /* 'q' => '@' */
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
/** "pt" keyboard map */
|
||||
struct keymap pt_keymap __keymap = {
|
||||
.name = "pt",
|
||||
.basic = pt_basic,
|
||||
.altgr = pt_altgr,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user