diff options
author | 2007-01-13 07:43:15 +0000 | |
---|---|---|
committer | 2007-01-13 07:43:15 +0000 | |
commit | 41660d28ef46fa4fcf52c742e8ca653d38949f62 (patch) | |
tree | ccd07cff7af52f2c62303371ca3ebcf2b3345a17 | |
parent | Regen (diff) | |
download | wireguard-openbsd-41660d28ef46fa4fcf52c742e8ca653d38949f62.tar.xz wireguard-openbsd-41660d28ef46fa4fcf52c742e8ca653d38949f62.zip |
Ignore country code on happy hacking keyboard, it reports itself as japanse.
Spotted by naddy@
-rw-r--r-- | sys/dev/usb/ukbd.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index eef711f1f7d..7c324cb1fd0 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ukbd.c,v 1.25 2006/06/26 22:14:12 miod Exp $ */ +/* $OpenBSD: ukbd.c,v 1.26 2007/01/13 07:43:15 miod Exp $ */ /* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -408,12 +408,17 @@ USB_ATTACH(ukbd) printf(", layout %d", hid->bCountryCode); #endif } else { - if (hid->bCountryCode <= HCC_MAX) - layout = ukbd_countrylayout[hid->bCountryCode]; + if (uha->uaa->vendor == USB_VENDOR_TOPRE && + uha->uaa->product == USB_PRODUCT_TOPRE_HHKB) { + /* ignore country code on purpose */ + } else { + if (hid->bCountryCode <= HCC_MAX) + layout = ukbd_countrylayout[hid->bCountryCode]; #ifdef DIAGNOSTIC - if (hid->bCountryCode != 0) - printf(", country code %d", hid->bCountryCode); + if (hid->bCountryCode != 0) + printf(", country code %d", hid->bCountryCode); #endif + } } if (layout == (kbd_t)-1) { #ifdef UKBD_LAYOUT |