HeuristicPerson/bluetooth_2_hid

Apple Keyboard Support

Opened this issue · 1 comments

Hello! I use a Keychron K2 in MacOS mode, I noticed that the function keys do not work.
I was able to make the Function Brightness keys work (by accident) when adding this to the ds_KEY_TO_HID:

'KEY BRIGHTNESSDOWN': chr(0x47),
'KEY_BRIGHTNESSUP': chr (0x48) ,

Is there any plan to make the Apple Keyboards work? I would be happy to help on that, I just don't know much about how does this work yet.

Hi, @brunofjesus, and thanks for the report.

Hi have a Keychron K2 myself and, using the usb connection in Mac mode I checked that F5 and F6 don't produce any key code in my regular desktop Linux PC. In windows mode, they produce:

$ sudo showkey
^[[15~keycode  63 press
keycode  63 release
^[[17~keycode  64 press
keycode  64 release

I'm not familiarised with Mac computers, why do you need to have your keyboard setup in Mac mode? My partner uses an USB keyboard in a Mac computer with no issues, have you tried setting up the keyboard in Windows mode?

My understanding is that the keyboard should be setup in Windows mode since it's connected to the Raspberry PC running Linux. Then, if you miss any key in your mac computer, the code of the program should be modified so it performs the translation between codes 63, 64 (regular F5 and F6 keys) to the missing special keys Mac needs.

I'll try to run the above command in the Mac of my partner to check whether F5 and F6 produce any keycode there.

Regards

EDIT: If I press "fn" key and F5/F6, they produce keycodes 229/230