Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

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

Closed
ylorn opened this issue May 15, 2015 · 2 comments
Closed

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

ylorn opened this issue May 15, 2015 · 2 comments

Comments

@ylorn
Copy link

ylorn commented May 15, 2015

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.

  • First, the Apple Internal Keyboard. This is what it looks like in the Device tab of EventViewer:
    Apple Internal KeyBoard Device Tab Screen Shot
    This is what it looks like in the Main tab of EventViewer when I tap (press and release quickly) the right shift key:
    Apple Internal Keyboard Main Tab Screen Shot
    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):
    Apple Internal Keyboard Debug Mode Response
    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:
    HHKB KeyBoard USB Device Tab Screen Shot
    This is what it looks like in the Main tab of EventViewer when I tap (press and release quickly) the right shift key:
    HHKB KeyBoard USB Main Tab Screen Shot
    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):
    HHKB KeyBoard USB Debug Mode Response
    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:
    HHKB KeyBoard BT Device Tab Screen Shot
    This is what it looks like in the Main tab of EventViewer when I tap (press and release quickly) the right shift key:
    HHKB KeyBoard BT Main Tab Screen Shot
    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):
    HHKB KeyBoard BT Debug Mode Response

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
Copy link
Member

tekezo commented May 16, 2015

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
Copy link
Author

ylorn commented May 16, 2015

Thanks! This saves my day!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants