-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HP Active Pen G2 top button is recognized as XF86AudioMicMute #49
Comments
How are you determining that the button is XF86AudioMicMute? I assume you are referring to the Bluetooth button that is where the eraser would normally be. As far as I'm aware, all of the Bluetooth buttons act identically, appearing to the system as a keyboard device which sends the SUPER+F20 keyboard shortcut when pressed (or other shortcuts for other actions). I don't know why the system's keyboard driver would be interpreting such a keyboard shortcut as XF86AudioMicMute... |
Via xev output. Here is sequence of press-release event, press and hold, and double press:
Same sequence in evtest:
Seems like that the case, according to evtest. Should I forward this issue to libinput or mutter then? (It's Gnome Shell Wayland session.) |
Its unlikely that libinput is responsible, but since you're using xev under Wayland it could be an issue in xwayland or elsewhere in the X stack. I suppose it could also be Mutter, but I'm not sure. I found this Mutter commit after a little searching which makes it sound like F20 used to be sent when the microphone mute button was pressed. Its possible that there's some compatibility layer is still assuming F20 should be translated into XF86AudioMicMute. That particular commit seems to be removing Mutter's F20 = XF86AudioMicMute assumption though, which is why I'm not very suspicious of that component. @whot knows more X11 input arcana than anyone else... Maybe he'll stop by with a clue :) |
yeah, libinput doesn't do anything with key events, certainly no remapping. The issue is... complicated. X (the protocol) has a limitation of 255 for key codes, but keycodes are offset by 8 for historical reasons. So the evdev to keycode mapping is literally "evdev keycode + 8". Next layer is the xkb model which maps that number to a symbolic key:
i.e. keycode 198 is mapped to FK20 and that is mapped to the symbol:
So this is where your 198 -> microphone mapping comes from. Note that FK20 is not F20. FK20 is an internal lookup symbol. The actual mapping applied is "198 -> XF86AudioMicMute". F20 mapped to F20 would look like this:
If that were the case, xev would show F20 as Keysym. Why do we map FK20 to micmute? Because we can't use this one:
The keycode is 248 + 8 = 256, outside of what X can deal with. ftr Wayland has 32bits so all this should work fine there. As for the mutter commit: this is the opposite of what we need. Previously, gnome would assume that both XF86AudioMicMute and F20 trigger the microphone. With that commit, only the former does so which means you could configure your XKB layout to have anything send XF86AudioMicMute. The latter would now just be interpreted as F20. But the pen itself sends keycode 190 ( If all the pens send F20 for those keys then we're in an amount of fecal matter of reasonable depth because I'm not aware of any workarounds to really get F20 working. Adding an XKB option would be doable but it would need manual applying (or heuristics-based). I think this screams for a GNOME bug to be opened to figure out what to do here... |
I put on my waders and tried out a hacked-up XKB definition with success. The ugly part, as you say, is going to be applying the option for these pens. I can try to gather the "keyboard" device names from the pens we have available if that helps in putting together a heuristic (whether for an xorg.conf.d rule or some GNOME logic). The kernel device itself doesn't look terribly helpful; it basically appears to be a full keyboard rather than just the handful of keys it ever sends. |
There's /me scratches his head and shrugs |
Please let me know if opening Gnome issue is still necessary. |
Yes please, we'll need to track this |
Mutter bugreport: https://gitlab.gnome.org/GNOME/mutter/issues/432 (was that right component to fill this bug, btw?) |
Meanwhile I added feature request regarding configuration of this button to Gnome Control Center: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/638 |
Ok, the request has been reported to Gnome. The button/key is beyond this project's scope. |
Hello!
Moved from https://sourceforge.net/p/linuxwacom/bugs/361/
I find that top button of HP Active Pen G2 (that was included in the package with HP Elite x2 1013 G3) is recognized as XF86AudioMicMute. Maybe remap this button to something else, more suitable?
sysinfo report is here: linuxwacom/wacom-hid-descriptors#42
The text was updated successfully, but these errors were encountered: