summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2022-02-14 14:45:59 +0100
committerMichael Brown2022-02-15 13:50:26 +0100
commite1cedbc0d4fdb0e16818f6b722f4873a50780761 (patch)
tree498de03ad0d5157c73479274569ea992cb47101c /src/include
parent[console] Centralise handling of key modifiers (diff)
downloadipxe-e1cedbc0d4fdb0e16818f6b722f4873a50780761.tar.gz
ipxe-e1cedbc0d4fdb0e16818f6b722f4873a50780761.tar.xz
ipxe-e1cedbc0d4fdb0e16818f6b722f4873a50780761.zip
[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/include')
-rw-r--r--src/include/ipxe/keymap.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/ipxe/keymap.h b/src/include/ipxe/keymap.h
index 3da25190b..72b6961ef 100644
--- a/src/include/ipxe/keymap.h
+++ b/src/include/ipxe/keymap.h
@@ -32,6 +32,8 @@ struct keymap {
const char *name;
/** Basic remapping table (zero-terminated) */
struct keymap_key *basic;
+ /** AltGr remapping table (zero-terminated) */
+ struct keymap_key *altgr;
};
/** Keyboard mapping table */
@@ -64,6 +66,9 @@ struct keymap {
/** Undo and redo CapsLock key flags */
#define KEYMAP_CAPSLOCK_REDO ( KEYMAP_CAPSLOCK | KEYMAP_CAPSLOCK_UNDO )
+/** AltGr key flag */
+#define KEYMAP_ALTGR 0x0800
+
extern unsigned int key_remap ( unsigned int character );
#endif /* _IPXE_KEYMAP_H */