Pārlūkot izejas kodu

[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>
tags/v1.20.1
Michael Brown 12 gadus atpakaļ
vecāks
revīzija
4740703d9d
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 4
    2
      src/util/genkeymap.pl

+ 4
- 2
src/util/genkeymap.pl Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt