aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/keymap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ipxe/keymap.h')
-rw-r--r--src/include/ipxe/keymap.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/include/ipxe/keymap.h b/src/include/ipxe/keymap.h
index 93c9e7314..a64ab9cd4 100644
--- a/src/include/ipxe/keymap.h
+++ b/src/include/ipxe/keymap.h
@@ -13,16 +13,29 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <stdint.h>
#include <ipxe/tables.h>
-/** A keyboard mapping */
-struct key_mapping {
+/** A remapped key
+ *
+ * Represents a mapping from an ASCII character (as interpreted from a
+ * keyboard scancode by the US-only keyboard driver provided by the
+ * BIOS) to the appropriate ASCII value for the keyboard layout.
+ */
+struct keymap_key {
/** Character read from keyboard */
uint8_t from;
/** Character to be used instead */
uint8_t to;
} __attribute__ (( packed ));
+/** A keyboard mapping */
+struct keymap {
+ /** Name */
+ const char *name;
+ /** Basic remapping table (zero-terminated) */
+ struct keymap_key *basic;
+};
+
/** Keyboard mapping table */
-#define KEYMAP __table ( struct key_mapping, "keymap" )
+#define KEYMAP __table ( struct keymap, "keymap" )
/** Define a keyboard mapping */
#define __keymap __table_entry ( KEYMAP, 01 )