david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[console] Ignore unexpected keysyms when generating keyboard maps

I am unable to find any definitive documentation on how Linux keyboard
symbols work.  In the absence of any documentation, I'm going to
assume that unexpected keysyms are harmless and should be ignored.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2012-03-27 20:55:19 +01:00
parent ed64732b73
commit 4740703d9d
1 changed files with 4 additions and 2 deletions

View File

@ -124,8 +124,10 @@ sub keysym_to_ascii {
return unless $keysym;
# Sanity check
die "Unexpected keysym ".sprintf ( "0x%04x\n", $keysym )."\n"
if $keysym & 0xf000;
if ( $keysym & 0xf000 ) {
warn "Unexpected keysym ".sprintf ( "0x%04x", $keysym )."\n";
return;
}
# Extract type and value
my $type = ( $keysym >> 8 );