[console] Fix definition of unreachability for remapped keys

The AltGr remapping table is constructed to include only keys that are
not reachable after applying the basic remapping table.  The logic
currently fails to include keys that are omitted entirely from the
basic remapping table since they would map to a non-ASCII character.

Fix this logic by allowing the remapping tables to include null
mappings, which are then elided only at the point of constructing the
C code fragment.

Reported-by: Christian Nilsson <nikize@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2022-02-15 16:41:19 +00:00
parent 4a37b05008
commit 419b2e71da
19 changed files with 137 additions and 23 deletions

View File

@@ -44,6 +44,7 @@ static struct keymap_key pt_altgr[] = {
{ 0x32, 0x40 }, /* '2' => '@' */
{ 0x37, 0x7b }, /* '7' => '{' */
{ 0x38, 0x5b }, /* '8' => '[' */
{ 0x39, 0x5d }, /* '9' => ']' */
{ 0x71, 0x40 }, /* 'q' => '@' */
{ 0, 0 }
};