aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hci/keymap/keymap_us.c2
-rw-r--r--src/include/ipxe/keymap.h5
-rwxr-xr-xsrc/util/genkeymap.py3
3 files changed, 7 insertions, 3 deletions
diff --git a/src/hci/keymap/keymap_us.c b/src/hci/keymap/keymap_us.c
index 6432474..b8e604a 100644
--- a/src/hci/keymap/keymap_us.c
+++ b/src/hci/keymap/keymap_us.c
@@ -21,7 +21,7 @@ static struct keymap_key us_altgr[] = {
};
/** "us" keyboard map */
-struct keymap us_keymap __keymap = {
+struct keymap us_keymap __keymap_default = {
.name = "us",
.basic = us_basic,
.altgr = us_altgr,
diff --git a/src/include/ipxe/keymap.h b/src/include/ipxe/keymap.h
index 72b6961..392d3ab 100644
--- a/src/include/ipxe/keymap.h
+++ b/src/include/ipxe/keymap.h
@@ -39,8 +39,11 @@ struct keymap {
/** Keyboard mapping table */
#define KEYMAP __table ( struct keymap, "keymap" )
+/** Define a default keyboard mapping */
+#define __keymap_default __table_entry ( KEYMAP, 01 )
+
/** Define a keyboard mapping */
-#define __keymap __table_entry ( KEYMAP, 01 )
+#define __keymap __table_entry ( KEYMAP, 02 )
/** Mappable character mask */
#define KEYMAP_MASK 0xff
diff --git a/src/util/genkeymap.py b/src/util/genkeymap.py
index 632f71e..9fd9874 100755
--- a/src/util/genkeymap.py
+++ b/src/util/genkeymap.py
@@ -399,6 +399,7 @@ class Keymap:
keymap_name = self.cname("keymap")
basic_name = self.cname("basic")
altgr_name = self.cname("altgr")
+ attribute = "__keymap_default" if self.name == "us" else "__keymap"
code = textwrap.dedent(f"""
/** @file
*
@@ -419,7 +420,7 @@ class Keymap:
static struct keymap_key {altgr_name}[] = %s;
/** "{self.name}" keyboard map */
- struct keymap {keymap_name} __keymap = {{
+ struct keymap {keymap_name} {attribute} = {{
\t.name = "{self.name}",
\t.basic = {basic_name},
\t.altgr = {altgr_name},