[Bug 222646] ukbd(4): support Consumer Control based multimedia keys
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Sep 27 15:58:44 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222646
Bug ID: 222646
Summary: ukbd(4): support Consumer Control based multimedia
keys
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: greg at unrelenting.technology
Created attachment 186765
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=186765&action=edit
ukbd_consumer_ctl.patch
This patch adds support for media keys (such as play/pause, next/prev track,
volume up/down) on USB keyboards where they're implemented as HID Consumer
Control reports by converting them into plain old key presses of matching keys.
Background: my mouse (Logitech G402) pretends to also be a keyboard, to allow
two programmable extra buttons to press any keyboard key. One of the options
for these keys is volume control, and I really like that. These key presses
were not recognized by the FreeBSD kernel. With this patch,
libinput-debug-events shows them as KEY_VOLUMEDOWN (114) and KEY_VOLUMEUP
(115), just like on Linux, and my XF86AudioRaise(Lower)Volume bindings in Xorg
work fine! Nothing in this patch is evdev specific though, it literally
translates these events to key presses.
Also: I have a wireless keyboard that pretends to also be a mouse (…yeah), and
for the media keys, it sends identical packets, but through a ums device. Tried
to do a similar thing (but evdev-only, since the normal mouse interface can't
press keys I guess) in the ums driver, wasted several hours only to encounter
weird problems… hid_locate couldn't even find the stuff, though it's clearly
there (uhidd recognizes it fine!). After removing the "Only copy HID item,
increment position and return if correct kindset" check from hid_get_item,
hid_locate "found" it but returned wrong data… So screw that for now, hopefully
most input devices use ukbd for media keys :D
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list