]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[console] Avoid attempting to remap numeric keypad on BIOS console
authorMichael Brown <mcb30@ipxe.org>
Wed, 9 Feb 2022 16:06:11 +0000 (16:06 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 10 Feb 2022 13:11:27 +0000 (13:11 +0000)
commitfa708015e545a5877b1c07e2acf40f25b333c2cd
tree86e889d7624d9b88a338fca41c04eb00b8695a14
parentf51a62bc3f7abb40e331c16df1f4d9314aefaf23
[console] Avoid attempting to remap numeric keypad on BIOS console

To minimise code size, our keyboard mapping works on the basis of
allowing the BIOS to convert the keyboard scancode into an ASCII
character and then remapping the ASCII character.

This causes problems with keyboard layouts such as "fr" that swap the
shifted and unshifted digit keys, since the ASCII-based remapping will
spuriously remap the numeric keypad (which produces the same ASCII
values as the digit keys).

Fix by checking that the keyboard scancode is within the range of keys
that vary between keyboard mappings before attempting to remap the
ASCII character.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/interface/pcbios/bios_console.c