From owner-freebsd-bugs@freebsd.org Wed Sep 27 15:58:44 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66C3CE07E61 for ; Wed, 27 Sep 2017 15:58:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5570A7CCEC for ; Wed, 27 Sep 2017 15:58:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v8RFwi8J052443 for ; Wed, 27 Sep 2017 15:58:44 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 222646] ukbd(4): support Consumer Control based multimedia keys Date: Wed, 27 Sep 2017 15:58:44 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: greg@unrelenting.technology X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Sep 2017 15:58:44 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222646 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@FreeBSD.org Reporter: greg@unrelenting.technology Created attachment 186765 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D186765&action= =3Dedit 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 k= eys. Background: my mouse (Logitech G402) pretends to also be a keyboard, to all= ow 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 X= org 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 (=E2=80= =A6yeah), and for the media keys, it sends identical packets, but through a ums device. T= ried 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 encount= er weird problems=E2=80=A6 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=E2=80=A6 So screw that for no= w, hopefully most input devices use ukbd for media keys :D --=20 You are receiving this mail because: You are the assignee for the bug.=