Closed chri2 closed 6 months ago
Try dumping hid descriptors first, I'm guessing this is appearing as something else other than keyboard... I don't have anything to test on while trying to provide support for this... I could try making a blind attempt at fixing it but that's not easy without testing.
I have the same issue with my Logitech G815 - the volume control doesn't work tthrough the deskhop. I'm on windows so have attached the output from hidsharp.test.exe - if this isn't useful let me know and I'll find a linux machine and use usbhid-dump. hidsharp_logitech_g815.txt
I hope this will help:
me@linux:~/deskhop/usbhid-dump$ lsusb | grep CHERR
Bus 001 Device 026: ID 046a:0180 CHERRY Strait 3.0
me@linux:~/deskhop/usbhid-dump$ sudo src/usbhid-dump -a 1:26
001:026:001:DESCRIPTOR 1709985170.815236
05 0C 09 01 A1 01 85 01 19 00 2A FF 03 15 00 26
FF 03 95 01 75 10 81 00 C0 05 01 09 80 A1 01 85
02 19 81 29 83 15 00 25 01 75 01 95 03 81 02 95
05 81 01 C0
001:026:000:DESCRIPTOR 1709985170.822942
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
75 01 95 08 81 02 95 01 75 08 81 01 95 03 75 01
05 08 19 01 29 03 91 02 95 05 75 01 91 01 95 06
75 08 15 00 26 FF 00 05 07 19 00 2A FF 00 81 00
C0
Does it help? Can I do anything else to help to debug the issue?
I have the same problem with a Keychron K3 Pro:
002:005:002:DESCRIPTOR 1711542891.021543
05 01 09 02 A1 01 85 02 09 01 A1 00 05 09 19 01
29 08 15 00 25 01 95 08 75 01 81 02 05 01 09 30
09 31 15 81 25 7F 95 02 75 08 81 06 09 38 15 81
25 7F 95 01 75 08 81 06 05 0C 0A 38 02 15 81 25
7F 95 01 75 08 81 06 C0 C0 05 01 09 80 A1 01 85
03 19 01 2A B7 00 15 01 26 B7 00 95 01 75 10 81
00 C0 05 0C 09 01 A1 01 85 04 19 01 2A A0 02 15
01 26 A0 02 95 01 75 10 81 00 C0 05 01 09 06 A1
01 85 06 05 07 19 E0 29 E7 15 00 25 01 95 08 75
01 81 02 05 07 19 00 29 EF 15 00 25 01 95 F0 75
01 81 02 05 08 19 01 29 05 95 05 75 01 91 02 95
01 75 03 91 01 C0
002:005:001:DESCRIPTOR 1711542891.022197
06 60 FF 09 61 A1 01 09 62 15 00 26 FF 00 95 20
75 08 81 02 09 63 15 00 26 FF 00 95 20 75 08 91
02 C0
002:005:000:DESCRIPTOR 1711542891.022449
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
95 08 75 01 81 02 95 01 75 08 81 01 05 07 19 00
29 FF 15 00 26 FF 00 95 06 75 08 81 00 05 08 19
01 29 05 95 05 75 01 91 02 95 01 75 03 91 01 C0
I would also like to help to debug this. Is there anything we could do?
You have:
Usage Page (Consumer), ; Consumer (0Ch) Usage (Consumer Control), ; Consumer control (01h, application collection) Collection (Application), Report ID (1), Usage Minimum (00h), Usage Maximum (03FFh), Logical Minimum (0), Logical Maximum (1023), Report Count (1), Report Size (16), Input, End Collection,
and I don't have anything similar to test with / develop on. Supporting a heterogeneous device ecosystem with every keyboard having a wildly different set of keys and implementations is quite tricky. I have a few ideas how to potentially address this, but they are either shitty, complicated or both :)
Any good suggestion and some domain knowledge on how to provide better support for these additional keys is more than welcome!
I'm not a developer nor do I have insight into HID. I naïvely came up with the thought that those keys in question are detected by Linux (Debian) without the need for any configuration. Could there be learned something from that how to handle the kind of hid used here?
A side question: does anybody know of a keyboard offering keys for mute on/off, volume up/down, play/pause that works with deskhop (and Linux)?
Update: Added this as a request for a list of hardware/configurations that are known to work or not work or partly work.
Just to add another keyboard as well, this is a Glorious GMMK Pro with Via firmware:
$ lsusb|grep lor
Bus 001 Device 009: ID 320f:5044 Glorious GMMK Pro ANSI
$ sudo usbhid-dump -a 1:9
001:009:002:DESCRIPTOR 1712774528.547981
05 01 09 02 A1 01 85 02 09 01 A1 00 05 09 19 01
29 08 15 00 25 01 95 08 75 01 81 02 05 01 09 30
09 31 15 81 25 7F 95 02 75 08 81 06 09 38 15 81
25 7F 95 01 75 08 81 06 05 0C 0A 38 02 15 81 25
7F 95 01 75 08 81 06 C0 C0 05 01 09 80 A1 01 85
03 19 01 2A B7 00 15 01 26 B7 00 95 01 75 10 81
00 C0 05 0C 09 01 A1 01 85 04 19 01 2A A0 02 15
01 26 A0 02 95 01 75 10 81 00 C0 05 01 09 06 A1
01 85 06 05 07 19 E0 29 E7 15 00 25 01 95 08 75
01 81 02 05 07 19 00 29 EF 15 00 25 01 95 F0 75
01 81 02 05 08 19 01 29 05 95 05 75 01 91 02 95
01 75 03 91 01 C0
001:009:001:DESCRIPTOR 1712774528.550978
06 60 FF 09 61 A1 01 09 62 15 00 26 FF 00 95 20
75 08 81 02 09 63 15 00 26 FF 00 95 20 75 08 91
02 C0
001:009:000:DESCRIPTOR 1712774528.553976
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
95 08 75 01 81 02 95 01 75 08 81 01 05 07 19 00
29 FF 15 00 26 FF 00 95 06 75 08 81 00 05 08 19
01 29 05 95 05 75 01 91 02 95 01 75 03 91 01 C0
The Glorious creates a lot of devices:
/dev/input/event4: Glorious GMMK Pro ANSI Mouse
/dev/input/event8: Glorious GMMK Pro ANSI System Control
/dev/input/event10: Glorious GMMK Pro ANSI Consumer Control
/dev/input/event12: Glorious GMMK Pro ANSI Keyboard
/dev/input/event13: Glorious GMMK Pro ANSI
Device 10 has the media keys:
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x320f product 0x5044 version 0x111
Input device name: "Glorious GMMK Pro ANSI Consumer Control"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 1 (KEY_ESC)
Event code 28 (KEY_ENTER)
Event code 74 (KEY_KPMINUS)
Event code 78 (KEY_KPPLUS)
Event code 103 (KEY_UP)
Event code 105 (KEY_LEFT)
Event code 106 (KEY_RIGHT)
Event code 108 (KEY_DOWN)
Event code 110 (KEY_INSERT)
Event code 111 (KEY_DELETE)
Event code 113 (KEY_MUTE)
Event code 114 (KEY_VOLUMEDOWN)
Event code 115 (KEY_VOLUMEUP)
Event code 116 (KEY_POWER)
Event code 119 (KEY_PAUSE)
Event code 120 (KEY_SCALE)
Event code 128 (KEY_STOP)
Event code 130 (KEY_PROPS)
Event code 131 (KEY_UNDO)
Event code 133 (KEY_COPY)
Event code 134 (KEY_OPEN)
Event code 135 (KEY_PASTE)
Event code 136 (KEY_FIND)
Event code 137 (KEY_CUT)
Event code 138 (KEY_HELP)
Event code 139 (KEY_MENU)
Event code 140 (KEY_CALC)
Event code 142 (KEY_SLEEP)
Event code 144 (KEY_FILE)
Event code 150 (KEY_WWW)
Event code 152 (KEY_SCREENLOCK)
Event code 155 (KEY_MAIL)
Event code 156 (KEY_BOOKMARKS)
Event code 158 (KEY_BACK)
Event code 159 (KEY_FORWARD)
Event code 161 (KEY_EJECTCD)
Event code 163 (KEY_NEXTSONG)
Event code 164 (KEY_PLAYPAUSE)
Event code 165 (KEY_PREVIOUSSONG)
Event code 166 (KEY_STOPCD)
Event code 167 (KEY_RECORD)
Event code 168 (KEY_REWIND)
Event code 169 (KEY_PHONE)
Event code 171 (KEY_CONFIG)
Event code 172 (KEY_HOMEPAGE)
Event code 173 (KEY_REFRESH)
Event code 174 (KEY_EXIT)
Event code 176 (KEY_EDIT)
Event code 177 (KEY_SCROLLUP)
Event code 178 (KEY_SCROLLDOWN)
Event code 181 (KEY_NEW)
Event code 182 (KEY_REDO)
Event code 206 (KEY_CLOSE)
Event code 207 (KEY_PLAY)
Event code 208 (KEY_FASTFORWARD)
Event code 209 (KEY_BASSBOOST)
Event code 210 (KEY_PRINT)
Event code 212 (KEY_CAMERA)
Event code 216 (KEY_CHAT)
Event code 217 (KEY_SEARCH)
Event code 219 (KEY_FINANCE)
Event code 223 (KEY_CANCEL)
Event code 224 (KEY_BRIGHTNESSDOWN)
Event code 225 (KEY_BRIGHTNESSUP)
Event code 228 (KEY_KBDILLUMTOGGLE)
Event code 229 (KEY_KBDILLUMDOWN)
Event code 230 (KEY_KBDILLUMUP)
Event code 231 (KEY_SEND)
Event code 232 (KEY_REPLY)
Event code 233 (KEY_FORWARDMAIL)
Event code 234 (KEY_SAVE)
Event code 235 (KEY_DOCUMENTS)
Event code 240 (KEY_UNKNOWN)
Event code 241 (KEY_VIDEO_NEXT)
Event code 244 (KEY_BRIGHTNESS_ZERO)
Event code 256 (BTN_0)
Event code 353 (KEY_SELECT)
Event code 354 (KEY_GOTO)
Event code 358 (KEY_INFO)
Event code 362 (KEY_PROGRAM)
Event code 366 (KEY_PVR)
Event code 370 (KEY_SUBTITLE)
Event code 372 (KEY_ZOOM)
Event code 374 (KEY_KEYBOARD)
Event code 375 (KEY_SCREEN)
Event code 376 (KEY_PC)
Event code 377 (KEY_TV)
Event code 378 (KEY_TV2)
Event code 379 (KEY_VCR)
Event code 380 (KEY_VCR2)
Event code 381 (KEY_SAT)
Event code 383 (KEY_CD)
Event code 384 (KEY_TAPE)
Event code 386 (KEY_TUNER)
Event code 387 (KEY_PLAYER)
Event code 389 (KEY_DVD)
Event code 392 (KEY_AUDIO)
Event code 393 (KEY_VIDEO)
Event code 396 (KEY_MEMO)
Event code 397 (KEY_CALENDAR)
Event code 398 (KEY_RED)
Event code 399 (KEY_GREEN)
Event code 400 (KEY_YELLOW)
Event code 401 (KEY_BLUE)
Event code 402 (KEY_CHANNELUP)
Event code 403 (KEY_CHANNELDOWN)
Event code 405 (KEY_LAST)
Event code 407 (KEY_NEXT)
Event code 408 (KEY_RESTART)
Event code 409 (KEY_SLOW)
Event code 410 (KEY_SHUFFLE)
Event code 412 (KEY_PREVIOUS)
Event code 416 (KEY_VIDEOPHONE)
Event code 417 (KEY_GAMES)
Event code 418 (KEY_ZOOMIN)
Event code 419 (KEY_ZOOMOUT)
Event code 420 (KEY_ZOOMRESET)
Event code 421 (KEY_WORDPROCESSOR)
Event code 422 (KEY_EDITOR)
Event code 423 (KEY_SPREADSHEET)
Event code 424 (KEY_GRAPHICSEDITOR)
Event code 425 (KEY_PRESENTATION)
Event code 426 (KEY_DATABASE)
Event code 427 (KEY_NEWS)
Event code 428 (KEY_VOICEMAIL)
Event code 429 (KEY_ADDRESSBOOK)
Event code 430 (KEY_MESSENGER)
Event code 431 (KEY_DISPLAYTOGGLE)
Event code 432 (KEY_SPELLCHECK)
Event code 433 (KEY_LOGOFF)
Event code 439 (KEY_MEDIA_REPEAT)
Event code 442 (KEY_IMAGES)
Event code 576 (KEY_BUTTONCONFIG)
Event code 577 (KEY_TASKMANAGER)
Event code 578 (KEY_JOURNAL)
Event code 579 (KEY_CONTROLPANEL)
Event code 580 (KEY_APPSELECT)
Event code 581 (KEY_SCREENSAVER)
Event code 582 (KEY_VOICECOMMAND)
Event code 583 (KEY_ASSISTANT)
Event code 584 (?)
Event code 585 (?)
Event code 586 (?)
Event code 587 (?)
Event code 588 (?)
Event code 589 (?)
Event code 592 (KEY_BRIGHTNESS_MIN)
Event code 593 (KEY_BRIGHTNESS_MAX)
Event type 2 (EV_REL)
Event code 6 (REL_HWHEEL)
Event code 12 (REL_HWHEEL_HI_RES)
Event type 3 (EV_ABS)
Event code 32 (ABS_VOLUME)
Value 0
Min 1
Max 672
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1712774996.959313, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e9
Event: time 1712774996.959313, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 1712774996.959313, -------------- SYN_REPORT ------------
Event: time 1712774996.969293, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e9
Event: time 1712774996.969293, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 1712774996.969293, -------------- SYN_REPORT ------------
Event: time 1712774998.178300, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00ea
Event: time 1712774998.178300, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 1712774998.178300, -------------- SYN_REPORT ------------
Event: time 1712774998.188294, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00ea
Event: time 1712774998.188294, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 1712774998.188294, -------------- SYN_REPORT ------------
Event: time 1712775000.094289, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e2
Event: time 1712775000.094289, type 1 (EV_KEY), code 113 (KEY_MUTE), value 1
Event: time 1712775000.094289, -------------- SYN_REPORT ------------
Event: time 1712775000.299273, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e2
Event: time 1712775000.299273, type 1 (EV_KEY), code 113 (KEY_MUTE), value 0
Event: time 1712775000.299273, -------------- SYN_REPORT ------------
Event: time 1712775001.489266, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e2
Event: time 1712775001.489266, type 1 (EV_KEY), code 113 (KEY_MUTE), value 1
Event: time 1712775001.489266, -------------- SYN_REPORT ------------
Event: time 1712775001.675263, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e2
Event: time 1712775001.675263, type 1 (EV_KEY), code 113 (KEY_MUTE), value 0
Event: time 1712775001.675263, -------------- SYN_REPORT ------------
It's very hard for me to debug remotely, but I've decided to open PP donation fund to purchase 1-2 keyboards/mice with those fancy buttons and rotary knobs, NKRO etc. That would enable me to at least try getting this to work for more people and improve the overall user experience...
Cool, I just transferred some funds. Hopefully it will help to fix this issue :). Thanks for all the effort so far, it seems to develop in a mature product.
Cool, I just transferred some funds. Hopefully it will help to fix this issue :). Thanks for all the effort so far, it seems to develop in a mature product.
Thank you, you really overdid it. If anyone has any cheap keyboards with knobs/media buttons to recommend, that would be great.
Well, a nice approach could be to start with QMK capable keyboards, but they're not exactly cheap. Perhaps a Keychron, like this one: https://www.keychron.com/products/keychron-v1-max-qmk-via-wireless-custom-mechanical-keyboard or: https://www.keychron.com/products/keychron-v2-qmk-custom-mechanical-keyboard?variant=40196919459929 The wireless with the keychron is not mandatory, you can still use them with an USB cable.
If you want to buy a Keychron to use for the really long run I can recommend the Q-series (like the Q2). They're much more expensive, but the base is made out of metal and they're made to last a lifetime.
Another option could be to buy a logitech with media keys, but I don't have such a keyboard myself so it would be hard for me to recommend one.
I have a keyboard I like and use, so really don't need anything expensive/fancy. Just something that will replicate the not working things so I can try to fix it and improve overall user experience by having the buttons work (worst case some configuration/mapping is needed). Also, rewriting the hid parser in a bit more universal way is something I need to do and that should take care of things like NKRO support. From that point on, most keyboards and mice should work sufficiently well. Then further improve mac/win workarounds and basic usability should be there.
Some things are also ugly and dumb, those need a rework so I can not be ashamed of them anymore, but as long as it kinda works... :)
Anyone up for some testing? I have partial support for media keys (no custom array ones yet, mostly generic variable ones should work).
I'll give it a try, thanks!
Wow awesome! Just tried it with my keychron (with QMK) and it works great!
I do have another bug though; in QMK I have programmed that the fn-key+ESC shuts down the computer (well, the dialog pops up), that key combination does not work unfortunately.
Wow awesome! Just tried it with my keychron (with QMK) and it works great!
I do have another bug though; in QMK I have programmed that the fn-key+ESC shuts down the computer (well, the dialog pops up), that key combination does not work unfortunately.
That might be the system control section, also doable. I finally got my keychron with those knobs and media keys, so now I somewhat understand how they work :)
Anyone up for some testing? I have partial support for media keys (no custom array ones yet, mostly generic variable ones should work).
@hrvach would you mind sharing the code in a branch or something? It doesn't work for me, but I would like to take a look what's different on my Logitech. Thanks for considering!
Anyone up for some testing? I have partial support for media keys (no custom array ones yet, mostly generic variable ones should work). deskhop-media-keys.zip
@hrvach would you mind sharing the code in a branch or something? It doesn't work for me, but I would like to take a look what's different on my Logitech. Thanks for considering!
@jalmeroth I'll publish it soon after cleaning it up, can you please do usbhid-dump -e all and press a couple of media keys for me? I need the consumer control descriptor (assuming this one is yours from a previous post)
Usage Page (Consumer), ; Consumer (0Ch) Usage (Consumer Control), ; Consumer control (01h, application collection) Collection (Application), Report ID (3), Report Count (2), Report Size (16), Logical Minimum (1), Logical Maximum (767), Usage Minimum (Consumer Control), ; Consumer control (01h, application collection) Usage Maximum (02FFh), Input, End Collection,
Anyone up for some testing? I have partial support for media keys (no custom array ones yet, mostly generic variable ones should work). deskhop-media-keys.zip
@hrvach would you mind sharing the code in a branch or something? It doesn't work for me, but I would like to take a look what's different on my Logitech. Thanks for considering!
@jalmeroth I'll publish it soon after cleaning it up, can you please do usbhid-dump -e all and press a couple of media keys for me? I need the consumer control descriptor (assuming this one is yours from a previous post)
Usage Page (Consumer), ; Consumer (0Ch) Usage (Consumer Control), ; Consumer control (01h, application collection) Collection (Application), Report ID (3), Report Count (2), Report Size (16), Logical Minimum (1), Logical Maximum (767), Usage Minimum (Consumer Control), ; Consumer control (01h, application collection) Usage Maximum (02FFh), Input, End Collection,
Yes, this looks like the right descriptor. Here is the usbhid-dump output https://github.com/hrvach/deskhop/issues/47#issuecomment-2090690389 I try to keep all relevant infos in this issue.
@jalmeroth any difference with deskhop-media-keys-2.zip ?
@jalmeroth any difference with deskhop-media-keys-2.zip ?
@hrvach standard keys are working but media keys are not send. Is report mode enabled? Do you might wanna create a debug build so we can see what's happening on the deskhop side in the console?
@hrvach standard keys are working but media keys are not send. Is report mode enabled? Do you might wanna create a debug build so we can see what's happening on the deskhop side in the console?
@jalmeroth consumer control is likely not sent in boot mode with that particular model ... :-| should start working once I get nkro support done.
Just checked using 0.52 with a Cherry STRAIT 3.0 BLACK. It seems that all keys are working now. The keys I found formerly not working were:
circle with a play triangle inside it
→ opens in Gnome/Debian the gnome-settingsplay/pause
-
(above number keypad) → volume down+
(above number keypad) → volume upspeaker symbol
→ mute/unmuteThanks for the great work! As far as I'm concerned this can be closed.
cc: @chri2 apologies to bug you, I'd appreciate some help with testing does this still upcoming release still work for your use case?
I'm using a Cherry Strait 3.0 keyboard. It seems that the media keys for
<play/pause>
,<volume down>
,<mute>
,<volume up>
are represented by there own input device.dmesg when connecting:
When trying
evtest
I get a selection of three devices for the keyboard:The normal keyboard on
event11
is what works using deskhop. Events for media keys can be found onevent12
:These are not relayed when the keyboard is connected through deskhop.
I didn't find out what the third
event13
device is used for - maybe it's just there even though no keys are connected.