pqrs-org / Karabiner-archived

Karabiner (KeyRemap4MacBook) is a powerful utility for keyboard customization.
https://pqrs.org/osx/karabiner/
The Unlicense
3.82k stars 311 forks source link

The Karabiner cannot catch the Keyboard Event of a bluetooth keyboard #403

Closed ylorn closed 9 years ago

ylorn commented 9 years ago

Here is the thing. I use my HHKB Professional 2 Type-S as my external keyboard. It usually requires a USB cable to connect to my mac, and it works great with Karabiner. Recently, I finally got tired of the cable, because it is extremely inconvenient to use for I have to connect it every time. So I bought an alt controller board from hasu. This controller board brings bluetooth compatibility to the HHKB, which is great because I can finally use my keyboard freely.

But problems come with it too. When in bluetooth mode, it can not work with the Karabiner! Here is the details. To make it as simple as possible, I only enable two items in Karabiner as the image shown below: Karabiner Preference Screen Shot What do these two items do is basically switch input source between English and Chinese by simulating Command + Space to select the previous input method when tapping (press and release quickly) the right Shift key, but the right shift key remains as the modifier key when you press (hold without releasing) it. Here is the detailed configuration of these two items: https://gist.github.com/ylorn/43b589daf6d621a7fc47

This configuration works fine with Apple Internal Keyboard and HHKB USB mode, but not with the HHKB Bluetooth mode. Let me show you the problem.

May 14 20:53:18 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [ caught]: eventType 12, flags 0x80020004, key 0x003c, kbdType  43, repeat = 0
May 14 20:53:18 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [sending]: eventType 12, flags 0x00020004, key 0x003c, kbdType  43, repeat = 0
May 14 20:53:18 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [ caught]: eventType 12, flags 0x80000000, key 0x003c, kbdType  43, repeat = 0
May 14 20:53:18 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [sending]: eventType 12, flags 0x00000000, key 0x003c, kbdType  43, repeat = 0
May 14 20:53:18 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [sending]: eventType 12, flags 0x00100008, key 0x0037, kbdType  43, repeat = 0
May 14 20:53:18 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [sending]: eventType 10, flags 0x00100008, key 0x0031, kbdType  43, repeat = 0
May 14 20:53:18 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [sending]: eventType 11, flags 0x00100008, key 0x0031, kbdType  43, repeat = 0
May 14 20:53:18 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [sending]: eventType 12, flags 0x00000000, key 0x0037, kbdType  43, repeat = 0
May 14 21:04:32 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [ caught]: eventType 12, flags 0x80020004, key 0x003c, kbdType  40, repeat = 0
May 14 21:04:32 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [sending]: eventType 12, flags 0x00020004, key 0x003c, kbdType  40, repeat = 0
May 14 21:04:32 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [ caught]: eventType 12, flags 0x80000000, key 0x003c, kbdType  40, repeat = 0
May 14 21:04:32 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [sending]: eventType 12, flags 0x00000000, key 0x003c, kbdType  40, repeat = 0
May 14 21:04:32 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [sending]: eventType 12, flags 0x00100008, key 0x0037, kbdType  40, repeat = 0
May 14 21:04:32 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [sending]: eventType 10, flags 0x00100008, key 0x0031, kbdType  40, repeat = 0
May 14 21:04:32 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [sending]: eventType 11, flags 0x00100008, key 0x0031, kbdType  40, repeat = 0
May 14 21:04:32 Troys-MacBook-Pro kernel[0]: org.pqrs.Karabiner --Debug-- KeyboardEventCallback [sending]: eventType 12, flags 0x00000000, key 0x0037, kbdType  40, repeat = 0

As you can see, from May 14 21:12:09, I have been keeping hitting the right shit key, but Karabiner has received nothing.

Would you please help me to figure out what is wrong? I will be really appreciate if you can give me some hint to fix this, because I can't live without Karabiner!

Thanks!

ylorn

tekezo commented 9 years ago

Your bluetooth device's Vendor ID and Product ID is zero. Karabiner ignores that keyboard device in order to avoid system crash from such invalid devices. Please enable this setting.

screen shot 2015-05-16 at 10 16 55 am

ylorn commented 9 years ago

Thanks! This saves my day!