aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2022-02-16 15:19:35 +0000
committerMichael Brown <mcb30@ipxe.org>2022-02-16 15:31:47 +0000
commitbc5c612f756b11c08e5e1eaeee3c1fd91252534d (patch)
tree5068ece4582bf3f2da30bfb35f42ab53984df155
parent304333dace992ea4b876a074c42bb7fd752137ca (diff)
downloadipxe-bc5c612f756b11c08e5e1eaeee3c1fd91252534d.zip
ipxe-bc5c612f756b11c08e5e1eaeee3c1fd91252534d.tar.gz
ipxe-bc5c612f756b11c08e5e1eaeee3c1fd91252534d.tar.bz2
[console] Include mappings for AltGr-Shift-<key>
The BIOS console's interpretation of LShift+RShift as equivalent to AltGr requires the shifted ASCII characters to be present in the AltGr mapping table, to allow AltGr-Shift-<key> to be interpreted in the same way as AltGr-<key>. For keyboard layouts that have different ASCII characters for AltGr-<key> and AltGr-Shift-<key>, this will potentially leave the character for AltGr-<key> inaccessible via the BIOS console if the BIOS requires the use of the LShift+RShift workaround. This theoretically affects the numeric keys in the Lithuanian ("lt") keyboard layout (where the numerals are accessed via AltGr-<key> and punctuation characters via AltGr-Shift-<key>), but the simple workaround for that keyboard layout is to avoid using AltGr and Shift entirely since the unmodified numeric keys are not remapped anyway. Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/hci/keymap/keymap_al.c1
-rw-r--r--src/hci/keymap/keymap_cf.c6
-rw-r--r--src/hci/keymap/keymap_cz.c9
-rw-r--r--src/hci/keymap/keymap_de.c8
-rw-r--r--src/hci/keymap/keymap_dk.c8
-rw-r--r--src/hci/keymap/keymap_es.c8
-rw-r--r--src/hci/keymap/keymap_fi.c4
-rw-r--r--src/hci/keymap/keymap_fr.c8
-rw-r--r--src/hci/keymap/keymap_hu.c13
-rw-r--r--src/hci/keymap/keymap_il.c5
-rw-r--r--src/hci/keymap/keymap_it.c8
-rw-r--r--src/hci/keymap/keymap_lt.c1
-rw-r--r--src/hci/keymap/keymap_mt.c5
-rw-r--r--src/hci/keymap/keymap_nl.c1
-rw-r--r--src/hci/keymap/keymap_no-latin1.c4
-rw-r--r--src/hci/keymap/keymap_no.c6
-rw-r--r--src/hci/keymap/keymap_pt.c5
-rw-r--r--src/hci/keymap/keymap_se.c6
-rw-r--r--src/hci/keymap/keymap_sg.c7
-rwxr-xr-xsrc/util/genkeymap.py8
20 files changed, 118 insertions, 3 deletions
diff --git a/src/hci/keymap/keymap_al.c b/src/hci/keymap/keymap_al.c
index 6e14395..ad4792b 100644
--- a/src/hci/keymap/keymap_al.c
+++ b/src/hci/keymap/keymap_al.c
@@ -39,6 +39,7 @@ static struct keymap_key al_basic[] = {
static struct keymap_key al_altgr[] = {
{ 0x21, 0x7e }, /* '!' => '~' */
{ 0x26, 0x60 }, /* '&' => '`' */
+ { 0x29, 0x7e }, /* ')' => '~' */
{ 0x30, 0x7e }, /* '0' => '~' */
{ 0x31, 0x7e }, /* '1' => '~' */
{ 0x34, 0x7e }, /* '4' => '~' */
diff --git a/src/hci/keymap/keymap_cf.c b/src/hci/keymap/keymap_cf.c
index 55bbfc1..7ecfc44 100644
--- a/src/hci/keymap/keymap_cf.c
+++ b/src/hci/keymap/keymap_cf.c
@@ -30,11 +30,17 @@ static struct keymap_key cf_basic[] = {
/** "cf" AltGr remapping */
static struct keymap_key cf_altgr[] = {
+ { 0x22, 0x7b }, /* '"' => '{' */
{ 0x27, 0x7b }, /* '\'' => '{' */
{ 0x32, 0x40 }, /* '2' => '@' */
+ { 0x3a, 0x7e }, /* ':' => '~' */
{ 0x3b, 0x7e }, /* ';' => '~' */
{ 0x5c, 0x7d }, /* '\\' => '}' */
{ 0x60, 0x5c }, /* '`' => '\\' */
+ { 0x7b, 0x5b }, /* '{' => '[' */
+ { 0x7c, 0x7d }, /* '|' => '}' */
+ { 0x7d, 0x5d }, /* '}' => ']' */
+ { 0x7e, 0x5c }, /* '~' => '\\' */
{ 0, 0 }
};
diff --git a/src/hci/keymap/keymap_cz.c b/src/hci/keymap/keymap_cz.c
index 08e9638..dd793a8 100644
--- a/src/hci/keymap/keymap_cz.c
+++ b/src/hci/keymap/keymap_cz.c
@@ -52,6 +52,7 @@ static struct keymap_key cz_basic[] = {
static struct keymap_key cz_altgr[] = {
{ 0x21, 0x7e }, /* '!' => '~' */
{ 0x24, 0x7e }, /* '$' => '~' */
+ { 0x28, 0x7b }, /* '(' => '{' */
{ 0x29, 0x7e }, /* ')' => '~' */
{ 0x2c, 0x3c }, /* ',' => '<' */
{ 0x2e, 0x3e }, /* '.' => '>' */
@@ -65,7 +66,13 @@ static struct keymap_key cz_altgr[] = {
{ 0x39, 0x7b }, /* '9' => '{' */
{ 0x3a, 0x7e }, /* ':' => '~' */
{ 0x3b, 0x24 }, /* ';' => '$' */
+ { 0x41, 0x7e }, /* 'A' => '~' */
+ { 0x42, 0x7b }, /* 'B' => '{' */
+ { 0x43, 0x26 }, /* 'C' => '&' */
+ { 0x46, 0x5b }, /* 'F' => '[' */
+ { 0x47, 0x5d }, /* 'G' => ']' */
{ 0x4b, 0x26 }, /* 'K' => '&' */
+ { 0x56, 0x40 }, /* 'V' => '@' */
{ 0x58, 0x3e }, /* 'X' => '>' */
{ 0x5a, 0x3c }, /* 'Z' => '<' */
{ 0x61, 0x7e }, /* 'a' => '~' */
@@ -76,6 +83,8 @@ static struct keymap_key cz_altgr[] = {
{ 0x6e, 0x7d }, /* 'n' => '}' */
{ 0x76, 0x40 }, /* 'v' => '@' */
{ 0x78, 0x23 }, /* 'x' => '#' */
+ { 0x7b, 0x5b }, /* '{' => '[' */
+ { 0x7d, 0x5d }, /* '}' => ']' */
{ 0, 0 }
};
diff --git a/src/hci/keymap/keymap_de.c b/src/hci/keymap/keymap_de.c
index ca5e4a9..fb1136d 100644
--- a/src/hci/keymap/keymap_de.c
+++ b/src/hci/keymap/keymap_de.c
@@ -45,15 +45,23 @@ static struct keymap_key de_basic[] = {
/** "de" AltGr remapping */
static struct keymap_key de_altgr[] = {
+ { 0x26, 0x7b }, /* '&' => '{' */
+ { 0x28, 0x5d }, /* '(' => ']' */
+ { 0x29, 0x7d }, /* ')' => '}' */
+ { 0x2a, 0x5b }, /* '*' => '[' */
{ 0x2d, 0x5c }, /* '-' => '\\' */
{ 0x30, 0x7d }, /* '0' => '}' */
{ 0x37, 0x7b }, /* '7' => '{' */
{ 0x38, 0x5b }, /* '8' => '[' */
{ 0x39, 0x5d }, /* '9' => ']' */
+ { 0x3a, 0x7e }, /* ':' => '~' */
{ 0x3b, 0x7e }, /* ';' => '~' */
+ { 0x51, 0x40 }, /* 'Q' => '@' */
{ 0x5d, 0x7e }, /* ']' => '~' */
+ { 0x5f, 0x5c }, /* '_' => '\\' */
{ 0x71, 0x40 }, /* 'q' => '@' */
{ 0x7c, 0x7e }, /* '|' => '~' */
+ { 0x7d, 0x7e }, /* '}' => '~' */
{ 0xdc, 0x7c }, /* Pseudo-'\\' => '|' */
{ 0, 0 }
};
diff --git a/src/hci/keymap/keymap_dk.c b/src/hci/keymap/keymap_dk.c
index 5b22902..45cdeb2 100644
--- a/src/hci/keymap/keymap_dk.c
+++ b/src/hci/keymap/keymap_dk.c
@@ -37,6 +37,11 @@ static struct keymap_key dk_basic[] = {
/** "dk" AltGr remapping */
static struct keymap_key dk_altgr[] = {
+ { 0x26, 0x7b }, /* '&' => '{' */
+ { 0x28, 0x5d }, /* '(' => ']' */
+ { 0x29, 0x7d }, /* ')' => '}' */
+ { 0x2a, 0x5b }, /* '*' => '[' */
+ { 0x2b, 0x7c }, /* '+' => '|' */
{ 0x30, 0x7d }, /* '0' => '}' */
{ 0x32, 0x40 }, /* '2' => '@' */
{ 0x34, 0x24 }, /* '4' => '$' */
@@ -45,9 +50,12 @@ static struct keymap_key dk_altgr[] = {
{ 0x39, 0x5d }, /* '9' => ']' */
{ 0x3a, 0x7e }, /* ':' => '~' */
{ 0x3d, 0x7c }, /* '=' => '|' */
+ { 0x51, 0x40 }, /* 'Q' => '@' */
{ 0x5c, 0x7e }, /* '\\' => '~' */
{ 0x5d, 0x7e }, /* ']' => '~' */
{ 0x71, 0x40 }, /* 'q' => '@' */
+ { 0x7c, 0x7e }, /* '|' => '~' */
+ { 0xfc, 0x5c }, /* Pseudo-'|' => '\\' */
{ 0, 0 }
};
diff --git a/src/hci/keymap/keymap_es.c b/src/hci/keymap/keymap_es.c
index 93d87f2..c1c55b3 100644
--- a/src/hci/keymap/keymap_es.c
+++ b/src/hci/keymap/keymap_es.c
@@ -37,8 +37,13 @@ static struct keymap_key es_basic[] = {
/** "es" AltGr remapping */
static struct keymap_key es_altgr[] = {
+ { 0x21, 0x7c }, /* '!' => '|' */
{ 0x22, 0x7b }, /* '"' => '{' */
+ { 0x26, 0x7b }, /* '&' => '{' */
{ 0x27, 0x7b }, /* '\'' => '{' */
+ { 0x28, 0x5d }, /* '(' => ']' */
+ { 0x29, 0x7d }, /* ')' => '}' */
+ { 0x2a, 0x5b }, /* '*' => '[' */
{ 0x2b, 0x7e }, /* '+' => '~' */
{ 0x2d, 0x5c }, /* '-' => '\\' */
{ 0x30, 0x7d }, /* '0' => '}' */
@@ -52,9 +57,12 @@ static struct keymap_key es_altgr[] = {
{ 0x3a, 0x7e }, /* ':' => '~' */
{ 0x3b, 0x7e }, /* ';' => '~' */
{ 0x3d, 0x7e }, /* '=' => '~' */
+ { 0x51, 0x40 }, /* 'Q' => '@' */
{ 0x5c, 0x7d }, /* '\\' => '}' */
+ { 0x5f, 0x5c }, /* '_' => '\\' */
{ 0x60, 0x5c }, /* '`' => '\\' */
{ 0x71, 0x40 }, /* 'q' => '@' */
+ { 0x7b, 0x5b }, /* '{' => '[' */
{ 0x7c, 0x7e }, /* '|' => '~' */
{ 0x7e, 0x5c }, /* '~' => '\\' */
{ 0xdc, 0x7c }, /* Pseudo-'\\' => '|' */
diff --git a/src/hci/keymap/keymap_fi.c b/src/hci/keymap/keymap_fi.c
index ac69813..8bcd0c3 100644
--- a/src/hci/keymap/keymap_fi.c
+++ b/src/hci/keymap/keymap_fi.c
@@ -35,6 +35,8 @@ static struct keymap_key fi_basic[] = {
/** "fi" AltGr remapping */
static struct keymap_key fi_altgr[] = {
+ { 0x26, 0x7b }, /* '&' => '{' */
+ { 0x29, 0x7d }, /* ')' => '}' */
{ 0x2d, 0x5c }, /* '-' => '\\' */
{ 0x30, 0x7d }, /* '0' => '}' */
{ 0x32, 0x40 }, /* '2' => '@' */
@@ -44,6 +46,8 @@ static struct keymap_key fi_altgr[] = {
{ 0x39, 0x5d }, /* '9' => ']' */
{ 0x49, 0x7c }, /* 'I' => '|' */
{ 0x5d, 0x7e }, /* ']' => '~' */
+ { 0x5f, 0x5c }, /* '_' => '\\' */
+ { 0x7d, 0x7e }, /* '}' => '~' */
{ 0xdc, 0x7c }, /* Pseudo-'\\' => '|' */
{ 0, 0 }
};
diff --git a/src/hci/keymap/keymap_fr.c b/src/hci/keymap/keymap_fr.c
index ad797f8..23a0837 100644
--- a/src/hci/keymap/keymap_fr.c
+++ b/src/hci/keymap/keymap_fr.c
@@ -65,6 +65,11 @@ static struct keymap_key fr_basic[] = {
/** "fr" AltGr remapping */
static struct keymap_key fr_altgr[] = {
+ { 0x25, 0x5b }, /* '%' => '[' */
+ { 0x26, 0x60 }, /* '&' => '`' */
+ { 0x29, 0x40 }, /* ')' => '@' */
+ { 0x2a, 0x5c }, /* '*' => '\\' */
+ { 0x2b, 0x7d }, /* '+' => '}' */
{ 0x2d, 0x5d }, /* '-' => ']' */
{ 0x30, 0x40 }, /* '0' => '@' */
{ 0x33, 0x23 }, /* '3' => '#' */
@@ -74,7 +79,10 @@ static struct keymap_key fr_altgr[] = {
{ 0x37, 0x60 }, /* '7' => '`' */
{ 0x38, 0x5c }, /* '8' => '\\' */
{ 0x3d, 0x7d }, /* '=' => '}' */
+ { 0x41, 0x40 }, /* 'A' => '@' */
{ 0x5c, 0x60 }, /* '\\' => '`' */
+ { 0x5e, 0x7c }, /* '^' => '|' */
+ { 0x5f, 0x5d }, /* '_' => ']' */
{ 0x61, 0x40 }, /* 'a' => '@' */
{ 0xdc, 0x7c }, /* Pseudo-'\\' => '|' */
{ 0, 0 }
diff --git a/src/hci/keymap/keymap_hu.c b/src/hci/keymap/keymap_hu.c
index d64baae..7716714 100644
--- a/src/hci/keymap/keymap_hu.c
+++ b/src/hci/keymap/keymap_hu.c
@@ -39,7 +39,9 @@ static struct keymap_key hu_basic[] = {
static struct keymap_key hu_altgr[] = {
{ 0x21, 0x7e }, /* '!' => '~' */
{ 0x23, 0x5e }, /* '#' => '^' */
+ { 0x24, 0x7e }, /* '$' => '~' */
{ 0x26, 0x60 }, /* '&' => '`' */
+ { 0x29, 0x7e }, /* ')' => '~' */
{ 0x2c, 0x3b }, /* ',' => ';' */
{ 0x2e, 0x3e }, /* '.' => '>' */
{ 0x2f, 0x2a }, /* '/' => '*' */
@@ -49,8 +51,19 @@ static struct keymap_key hu_altgr[] = {
{ 0x33, 0x5e }, /* '3' => '^' */
{ 0x34, 0x7e }, /* '4' => '~' */
{ 0x37, 0x60 }, /* '7' => '`' */
+ { 0x3a, 0x24 }, /* ':' => '$' */
{ 0x3b, 0x24 }, /* ';' => '$' */
+ { 0x3c, 0x3b }, /* '<' => ';' */
+ { 0x40, 0x5e }, /* '@' => '^' */
+ { 0x42, 0x7b }, /* 'B' => '{' */
+ { 0x43, 0x26 }, /* 'C' => '&' */
+ { 0x46, 0x5b }, /* 'F' => '[' */
+ { 0x47, 0x5d }, /* 'G' => ']' */
{ 0x4b, 0x26 }, /* 'K' => '&' */
+ { 0x4d, 0x3c }, /* 'M' => '<' */
+ { 0x51, 0x5c }, /* 'Q' => '\\' */
+ { 0x56, 0x40 }, /* 'V' => '@' */
+ { 0x57, 0x7c }, /* 'W' => '|' */
{ 0x58, 0x3e }, /* 'X' => '>' */
{ 0x5a, 0x3c }, /* 'Z' => '<' */
{ 0x62, 0x7b }, /* 'b' => '{' */
diff --git a/src/hci/keymap/keymap_il.c b/src/hci/keymap/keymap_il.c
index 95e33a0..b11e7ce 100644
--- a/src/hci/keymap/keymap_il.c
+++ b/src/hci/keymap/keymap_il.c
@@ -31,7 +31,12 @@ static struct keymap_key il_basic[] = {
/** "il" AltGr remapping */
static struct keymap_key il_altgr[] = {
+ { 0x22, 0x27 }, /* '"' => '\'' */
+ { 0x3f, 0x2f }, /* '?' => '/' */
{ 0x5c, 0x60 }, /* '\\' => '`' */
+ { 0x71, 0x2f }, /* 'q' => '/' */
+ { 0x77, 0x27 }, /* 'w' => '\'' */
+ { 0x7c, 0x60 }, /* '|' => '`' */
{ 0, 0 }
};
diff --git a/src/hci/keymap/keymap_it.c b/src/hci/keymap/keymap_it.c
index 2511bb7..bb14ae1 100644
--- a/src/hci/keymap/keymap_it.c
+++ b/src/hci/keymap/keymap_it.c
@@ -37,17 +37,25 @@ static struct keymap_key it_basic[] = {
/** "it" AltGr remapping */
static struct keymap_key it_altgr[] = {
+ { 0x22, 0x23 }, /* '"' => '#' */
{ 0x23, 0x7e }, /* '#' => '~' */
+ { 0x26, 0x7b }, /* '&' => '{' */
{ 0x27, 0x23 }, /* '\'' => '#' */
+ { 0x28, 0x5d }, /* '(' => ']' */
+ { 0x29, 0x7d }, /* ')' => '}' */
+ { 0x2a, 0x5b }, /* '*' => '[' */
{ 0x2d, 0x60 }, /* '-' => '`' */
{ 0x30, 0x7d }, /* '0' => '}' */
{ 0x37, 0x7b }, /* '7' => '{' */
{ 0x38, 0x5b }, /* '8' => '[' */
{ 0x39, 0x5d }, /* '9' => ']' */
+ { 0x3a, 0x40 }, /* ':' => '@' */
{ 0x3b, 0x40 }, /* ';' => '@' */
{ 0x3d, 0x7e }, /* '=' => '~' */
{ 0x40, 0x7e }, /* '@' => '~' */
+ { 0x51, 0x40 }, /* 'Q' => '@' */
{ 0x5c, 0x60 }, /* '\\' => '`' */
+ { 0x5f, 0x60 }, /* '_' => '`' */
{ 0x71, 0x40 }, /* 'q' => '@' */
{ 0x7c, 0x7e }, /* '|' => '~' */
{ 0, 0 }
diff --git a/src/hci/keymap/keymap_lt.c b/src/hci/keymap/keymap_lt.c
index a237b1d..f8e60a5 100644
--- a/src/hci/keymap/keymap_lt.c
+++ b/src/hci/keymap/keymap_lt.c
@@ -20,6 +20,7 @@ static struct keymap_key lt_altgr[] = {
{ 0x22, 0x5e }, /* '"' => '^' */
{ 0x27, 0x5e }, /* '\'' => '^' */
{ 0x4b, 0x26 }, /* 'K' => '&' */
+ { 0x51, 0x40 }, /* 'Q' => '@' */
{ 0x71, 0x40 }, /* 'q' => '@' */
{ 0, 0 }
};
diff --git a/src/hci/keymap/keymap_mt.c b/src/hci/keymap/keymap_mt.c
index a95c5b4..0997bfe 100644
--- a/src/hci/keymap/keymap_mt.c
+++ b/src/hci/keymap/keymap_mt.c
@@ -22,11 +22,16 @@ static struct keymap_key mt_basic[] = {
/** "mt" AltGr remapping */
static struct keymap_key mt_altgr[] = {
+ { 0x26, 0x7b }, /* '&' => '{' */
+ { 0x28, 0x5d }, /* '(' => ']' */
+ { 0x29, 0x7d }, /* ')' => '}' */
+ { 0x2a, 0x5b }, /* '*' => '[' */
{ 0x30, 0x7d }, /* '0' => '}' */
{ 0x37, 0x7b }, /* '7' => '{' */
{ 0x38, 0x5b }, /* '8' => '[' */
{ 0x39, 0x5d }, /* '9' => ']' */
{ 0x5c, 0x60 }, /* '\\' => '`' */
+ { 0x7e, 0x60 }, /* '~' => '`' */
{ 0, 0 }
};
diff --git a/src/hci/keymap/keymap_nl.c b/src/hci/keymap/keymap_nl.c
index 8038d4d..97c7e8b 100644
--- a/src/hci/keymap/keymap_nl.c
+++ b/src/hci/keymap/keymap_nl.c
@@ -46,6 +46,7 @@ static struct keymap_key nl_altgr[] = {
{ 0x2d, 0x5c }, /* '-' => '\\' */
{ 0x38, 0x7b }, /* '8' => '{' */
{ 0x39, 0x7d }, /* '9' => '}' */
+ { 0x5f, 0x5c }, /* '_' => '\\' */
{ 0, 0 }
};
diff --git a/src/hci/keymap/keymap_no-latin1.c b/src/hci/keymap/keymap_no-latin1.c
index 1f4cc38..80df848 100644
--- a/src/hci/keymap/keymap_no-latin1.c
+++ b/src/hci/keymap/keymap_no-latin1.c
@@ -40,7 +40,11 @@ static struct keymap_key no_latin1_basic[] = {
/** "no-latin1" AltGr remapping */
static struct keymap_key no_latin1_altgr[] = {
{ 0x22, 0x5b }, /* '"' => '[' */
+ { 0x26, 0x7b }, /* '&' => '{' */
{ 0x27, 0x7b }, /* '\'' => '{' */
+ { 0x28, 0x5d }, /* '(' => ']' */
+ { 0x29, 0x7d }, /* ')' => '}' */
+ { 0x2a, 0x5b }, /* '*' => '[' */
{ 0x30, 0x7d }, /* '0' => '}' */
{ 0x32, 0x40 }, /* '2' => '@' */
{ 0x37, 0x7b }, /* '7' => '{' */
diff --git a/src/hci/keymap/keymap_no.c b/src/hci/keymap/keymap_no.c
index 239e3ae..0a624c3 100644
--- a/src/hci/keymap/keymap_no.c
+++ b/src/hci/keymap/keymap_no.c
@@ -39,6 +39,10 @@ static struct keymap_key no_basic[] = {
/** "no" AltGr remapping */
static struct keymap_key no_altgr[] = {
+ { 0x26, 0x7b }, /* '&' => '{' */
+ { 0x28, 0x5d }, /* '(' => ']' */
+ { 0x29, 0x7d }, /* ')' => '}' */
+ { 0x2a, 0x5b }, /* '*' => '[' */
{ 0x30, 0x7d }, /* '0' => '}' */
{ 0x32, 0x40 }, /* '2' => '@' */
{ 0x34, 0x24 }, /* '4' => '$' */
@@ -46,9 +50,11 @@ static struct keymap_key no_altgr[] = {
{ 0x38, 0x5b }, /* '8' => '[' */
{ 0x39, 0x5d }, /* '9' => ']' */
{ 0x3a, 0x7e }, /* ':' => '~' */
+ { 0x51, 0x40 }, /* 'Q' => '@' */
{ 0x5c, 0x7e }, /* '\\' => '~' */
{ 0x5d, 0x7e }, /* ']' => '~' */
{ 0x71, 0x40 }, /* 'q' => '@' */
+ { 0x7c, 0x7e }, /* '|' => '~' */
{ 0, 0 }
};
diff --git a/src/hci/keymap/keymap_pt.c b/src/hci/keymap/keymap_pt.c
index 75bf565..3133c15 100644
--- a/src/hci/keymap/keymap_pt.c
+++ b/src/hci/keymap/keymap_pt.c
@@ -40,11 +40,16 @@ static struct keymap_key pt_basic[] = {
/** "pt" AltGr remapping */
static struct keymap_key pt_altgr[] = {
+ { 0x26, 0x7b }, /* '&' => '{' */
+ { 0x28, 0x5d }, /* '(' => ']' */
+ { 0x29, 0x7d }, /* ')' => '}' */
+ { 0x2a, 0x5b }, /* '*' => '[' */
{ 0x30, 0x7d }, /* '0' => '}' */
{ 0x32, 0x40 }, /* '2' => '@' */
{ 0x37, 0x7b }, /* '7' => '{' */
{ 0x38, 0x5b }, /* '8' => '[' */
{ 0x39, 0x5d }, /* '9' => ']' */
+ { 0x51, 0x40 }, /* 'Q' => '@' */
{ 0x71, 0x40 }, /* 'q' => '@' */
{ 0, 0 }
};
diff --git a/src/hci/keymap/keymap_se.c b/src/hci/keymap/keymap_se.c
index 9c6cf64..2bac969 100644
--- a/src/hci/keymap/keymap_se.c
+++ b/src/hci/keymap/keymap_se.c
@@ -37,6 +37,10 @@ static struct keymap_key se_basic[] = {
/** "se" AltGr remapping */
static struct keymap_key se_altgr[] = {
+ { 0x26, 0x7b }, /* '&' => '{' */
+ { 0x28, 0x5d }, /* '(' => ']' */
+ { 0x29, 0x7d }, /* ')' => '}' */
+ { 0x2a, 0x5b }, /* '*' => '[' */
{ 0x2d, 0x5c }, /* '-' => '\\' */
{ 0x30, 0x7d }, /* '0' => '}' */
{ 0x32, 0x40 }, /* '2' => '@' */
@@ -44,7 +48,9 @@ static struct keymap_key se_altgr[] = {
{ 0x37, 0x7b }, /* '7' => '{' */
{ 0x38, 0x5b }, /* '8' => '[' */
{ 0x39, 0x5d }, /* '9' => ']' */
+ { 0x51, 0x40 }, /* 'Q' => '@' */
{ 0x5d, 0x7e }, /* ']' => '~' */
+ { 0x5f, 0x5c }, /* '_' => '\\' */
{ 0x71, 0x40 }, /* 'q' => '@' */
{ 0xdc, 0x7c }, /* Pseudo-'\\' => '|' */
{ 0, 0 }
diff --git a/src/hci/keymap/keymap_sg.c b/src/hci/keymap/keymap_sg.c
index 2afe59c..c420009 100644
--- a/src/hci/keymap/keymap_sg.c
+++ b/src/hci/keymap/keymap_sg.c
@@ -45,12 +45,19 @@ static struct keymap_key sg_basic[] = {
/** "sg" AltGr remapping */
static struct keymap_key sg_altgr[] = {
+ { 0x22, 0x7b }, /* '"' => '{' */
+ { 0x26, 0x7c }, /* '&' => '|' */
{ 0x27, 0x7b }, /* '\'' => '{' */
+ { 0x2b, 0x7e }, /* '+' => '~' */
{ 0x32, 0x40 }, /* '2' => '@' */
{ 0x33, 0x23 }, /* '3' => '#' */
{ 0x37, 0x7c }, /* '7' => '|' */
{ 0x3d, 0x7e }, /* '=' => '~' */
{ 0x5c, 0x7d }, /* '\\' => '}' */
+ { 0x7b, 0x5b }, /* '{' => '[' */
+ { 0x7c, 0x7d }, /* '|' => '}' */
+ { 0x7d, 0x5d }, /* '}' => ']' */
+ { 0xfc, 0x5c }, /* Pseudo-'|' => '\\' */
{ 0, 0 }
};
diff --git a/src/util/genkeymap.py b/src/util/genkeymap.py
index 9fd9874..b70ce5f 100755
--- a/src/util/genkeymap.py
+++ b/src/util/genkeymap.py
@@ -365,9 +365,11 @@ class Keymap:
"""AltGr remapping table"""
# Construct raw mapping from source ASCII to target ASCII
raw = {
- source:
- self.target.get((key.modifiers | KeyModifiers.ALTGR),
- self.target[key.modifiers])[key.keycode].ascii
+ source: next((self.target[x][key.keycode].ascii
+ for x in (key.modifiers | KeyModifiers.ALTGR,
+ KeyModifiers.ALTGR, key.modifiers)
+ if x in self.target
+ and self.target[x][key.keycode].ascii), None)
for source, key in self.source.inverse.items()
}
# Identify printable keys that are unreachable via the basic map