Bug 98400

Summary: Multimedia Keys not recognized
Product: Wayland Reporter: Jon Kristian <hello>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: normal    
Priority: medium CC: peter.hutterer
Version: 1.5.0   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Evemu Log
labelled msc scan keys

Description Jon Kristian 2016-10-23 11:21:48 UTC
Created attachment 127495 [details]
Evemu Log

Some keys on my HP multimedia keyboard are not recognized, no reponse when running libinput-debug-events, but they are recognized running evemu-record, attached is a log.
Comment 1 Peter Hutterer 2016-10-24 22:56:17 UTC
If you only get a MSC_SCAN but no EV_KEY event within the same frame this means the key isn't mapped in the kernel. Please label the various MSC_SCAN codes with what the key is supposed to do, according to the keyboard's key labels
Comment 2 Jon Kristian 2016-10-27 13:10:33 UTC
Created attachment 127562 [details]
labelled msc scan keys

Here are MSC_SCAN keys with labels from keyboard.
Comment 3 Peter Hutterer 2017-01-09 22:09:39 UTC
sorry about the delay, this fell through.

short summary: this would need to go into systemd's hwdb (60-keyboard.hwdb) but I fail to see any identifying information for that keyboard, so I'm not sure we can make a generic match here. Is this a laptop? The dmi only includes the gigabyte motherboard's information and the keyboard claims it's connected via serial bus.

either way, the solution to this would be a blurb simliar to others in the 60-keyboard.hwdb file. A match string, together with the scancode to event code mappings. example here:

evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*Presario*CQ*:pvr*
 KEYBOARD_KEY_d8=f21
 KEYBOARD_KEY_d9=f21

You'll need to convert the scancodes into hex (e.g. 159 -> 0x9f) and then add the entries. the key names are in /usr/linux/input-event-codes.h, just lowercase it and remove the KEY_ prefix.

If we can't find any identifying information, you'll have to keep this as a local override in /etc/udev/hwdb.d/

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.