-
Notifications
You must be signed in to change notification settings - Fork 303
The Karabiner cannot catch the Keyboard Event of a bluetooth keyboard #403
Description
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:
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.
- First, the Apple Internal Keyboard. This is what it looks like in the Device tab of EventViewer:
This is what it looks like in the Main tab of EventViewer when I tap (press and release quickly) the right shift key:
This is what debug mode responses when I tap (press and release quickly) the right shift key (to see if it can receive the keyboard event properly):
To be specific, it is the following lines:
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
- Second, the HHKB KeyBoard with USB Mode (connect HHKB to the mac via an USB cable). This is what it looks like in the Device tab of EventViewer:
This is what it looks like in the Main tab of EventViewer when I tap (press and release quickly) the right shift key:
This is what debug mode responses when I tap (press and release quickly) the right shift key (to see if it can receive the keyboard event properly):
To be specific, it is the following lines:
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
- Finally, the HHKB Keyboard with Bluetooth mode (connect HHKB to mac via Bluetooth). This is what it looks like in the Device tab of EventViewer:
This is what it looks like in the Main tab of EventViewer when I tap (press and release quickly) the right shift key:
This is what debug mode responses when I tap (press and release quickly) the right shift key (to see if it can receive the keyboard event properly):
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









