From 7c5aae8d8a9b3b7ff9efaa21c6ac8c41f70292bf Mon Sep 17 00:00:00 2001 From: Pablo Saratxaga Date: Tue, 25 May 2004 15:35:25 +0000 Subject: don't trust the USB keyboard layout announc when it claims to be "us" layout (mosdt manufacturers just keep that default value while seeling different layouts) --- perl-install/keyboard.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index 9fda913fb..2b43a73bf 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -120,13 +120,16 @@ my %lang2keyboard = # USB kbd table # The numeric values are the bCountryCode field (5th byte) of HID descriptor +# NOTE: we don't trust when the layout is declared as us layout (0x21) +# as most manufacturers just use that value when selling physical devices +# with different layouts printed on the keys. my @usb2keyboard = ( qw(SKIP ar_SKIP be ca_SKIP qc cz dk fi fr de gr il hu us_intl it jp), #- 0x10 qw(kr la nl no ir pl pt ru sk es se ch_de ch_de ch_de tw_SKIP tr_q), #- 0x20 - qw(uk us yu tr_f), + qw(uk us_SKIP yu tr_f), #- higher codes not attribued as of 2002-02 ); @@ -550,7 +553,7 @@ sub check() { } } /SKIP/ || $keyboards{$_} or $err->("invalid keyboard $_ in \@usb2keyboard keyboard.pm") foreach @usb2keyboard; - $usb2keyboard[0x21] eq 'us' or $err->('@usb2keyboard is badly modified, 0x21 is not us keyboard'); + $usb2keyboard[0x21] eq 'us_SKIP' or $err->('@usb2keyboard is badly modified, 0x21 is not us keyboard'); my @xkb_groups = map { if_(/grp:(\S+)/, $1) } cat_('/usr/lib/X11/xkb/rules/xfree86.lst'); $err->("invalid xkb group toggle '$_' in \%grp_toggles") foreach difference2([ keys %grp_toggles ], \@xkb_groups); -- cgit v1.2.1