summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-01-13 07:43:16 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-01-13 07:43:16 +0000
commit96497242ae24bb191d3e815d9db58c588a860e9a (patch)
tree438a9e0199e9d5f39fb9adec24584afe52bcc3c7 /sys/dev/usb
parent6982f3ba6f1d453102070b7094506501ac0d9143 (diff)
Ignore country code on happy hacking keyboard, it reports itself as japanse.
Spotted by naddy@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ukbd.c15
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