Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
mcb30 committed Mar 27, 2012
1 parent ed64732 commit 4740703
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/util/genkeymap.pl
Expand Up @@ -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 );
Expand Down

0 comments on commit 4740703

Please sign in to comment.