hrvach / deskhop

Fast Desktop Switching Device
GNU General Public License v3.0
6.37k stars 185 forks source link

F24 is not sent? #160

Open adofse opened 2 months ago

adofse commented 2 months ago

I use ZMK based keyboard and map a key to F24 (and F24 to apple_vendor_top_case_key_code: keyboard_fn using Karabiner-Elements). When my keyboard is connected to deskhop, it does not send F24 key to macOS.

Normally, Karabiner-EventViewer shows all key codes but F24 is not appear when connecting my keyboard to deskhop.

How can I configure?

I use pre-built v0.65.

hrvach commented 2 months ago

if you map it to F23, does it forward that ? I have an idea what might be happening.

adofse commented 1 month ago

F23 is also not forwarded.

adofse commented 1 month ago

@hrvach Can you take a look at this issue or guide me to how to fix? Unfortunately I can't use deskhop until this issue is fixed.

hrvach commented 1 month ago

I don't have any keyboard that sends F24 or F23 atm, I'll have to think of something. In the meantime, is your NKRO enabled in ZMK settings? Can you try temporarily disabling it to see if anything is different? Also try editing keyboard.c and under HOTKEY_TOGGLE try flipping pass_to_os to true. Any difference?

adofse commented 1 month ago

Yes, NKRO is enabled in ZMK settings. From my understanding, NKRO is required to send F13 to F24 on my ZMK keyboard.

I will change HOEKY_TOGGLE later to see if it works.

hrvach commented 1 month ago

Just for science, try without NKRO ... ?

adofse commented 1 month ago

I don't think it's possible to send F13-24 without NKRO on ZMK.

This PR might help how to handle those on deskhop?

hrvach commented 1 month ago

Can you paste the hid descriptor for this keyboard, maybe that could reveal why those F13+ keys are getting ignored?

adofse commented 1 month ago

I'm afraid that I am not familiar this kind of software. I use this https://github.com/KinesisCorporation/Adv360-Pro-ZMK ZMK firmware which depends on https://github.com/ReFil/zmk/tree/adv360-z3.5 .

Probably these ones?

hrvach commented 1 month ago

Something like this can help: https://github.com/todbot/mac-hid-dump

Just build and run with keyboard plugged in directly to your mac, should display its descriptors and maybe hint at what's going on.

adofse commented 1 month ago

The other HID is printed but I trim for this keyboard with Karabiner-elenents disabled.

$ ./mac-hid-dump 
mac-hid-dump:
1D50 615E: Kinesis Corporation - Adv360 Pro
DESCRIPTOR:
  05  01  09  06  a1  01  85  01  05  07  19  e0  29  e7  15  00 
  25  01  75  01  95  08  81  02  05  07  75  08  95  01  81  03 
  05  08  19  01  29  05  75  01  95  05  91  02  05  08  75  03 
  95  01  91  03  05  07  15  00  25  01  19  00  29  97  75  01 
  95  98  81  02  c0  05  0c  09  01  a1  01  85  02  05  0c  15 
  00  26  ff  00  19  00  29  ff  75  08  95  06  81  00  c0  
  (95 bytes)
05AC 8600:  - TouchBarUserDevice
hrvach commented 1 month ago

It looks like a standard NKRO, nothing that would immediately suggest something off. I'll try to figure out a way to recreate F24 + NKRO, but it might take a while (very busy season).

adofse commented 1 month ago

Thank you! deskhop is exactly I've been looked for past few years and I'm looking forward to finally using it when it's fixed!