]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[console] Avoid overlap between remapping flags and character values
authorMichael Brown <mcb30@ipxe.org>
Tue, 13 Jun 2023 18:35:57 +0000 (19:35 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 13 Jun 2023 18:35:57 +0000 (19:35 +0100)
commit24eecdb7e29007d9641b0d55b4ba5208ee77c76d
treeabccb8e0afa820317c6677b0fb704bb8b9099a05
parent4fa4052c7ebb59e4d4aa396f1563c89118623ec7
[console] Avoid overlap between remapping flags and character values

The keyboard remapping flags currently occupy bits 8 and upwards of
the to-be-mapped character value.  This overlaps the range used for
special keys (KEY_MIN and upwards) and also overlaps the valid Unicode
character range.

No conflict is created by this overlap, since by design only ASCII
character values (as generated by an ASCII-only keyboard driver) are
subject to remapping, and so the to-be-remapped character values exist
in a conceptually separate namespace from either special keys or
non-ASCII Unicode characters.  However, the overlap is potentially
confusing for readers of the code.

Minimise cognitive load by using bits 24 and upwards for the keyboard
remapping flags.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/keymap.h