Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #181920

Re: Add unknown keyboard key

From Floris <jkfloris@dds.nl>
Newsgroups linux.debian.user
Subject Re: Add unknown keyboard key
Date 2017-06-08 14:30 +0200
Message-ID <tQ4JA-4eB-9@gated-at.bofh.it> (permalink)
References <tMtQd-17n-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Op Mon, 29 May 2017 16:27:49 +0200 schreef Floris <jkfloris@dds.nl>:

> Hey,
>
> I have an older Asus R2E UMPC. A long time it has Windows installed on  
> it, because I only used it as a navigation device. And an attempt, long  
> ago, to install and run Fedora on it, didn't work. But time has changed,  
> Windows 10 is sluggish. So I give it an other try with Debian Sid (The  
> same version I run on my desktop). So far so good. The touchscreen and  
> fingerprint reader works. And even with Gnome3 the performance is good.  
> There is only one issue so far: an extra button on the device.
>
> There are 4 extra buttons and I remapped them with xmodmap. And it looks  
> like they work, because when I run
> xev -event keyboard
> The keys are correct:
> - keycode 112 XF86ScrollUp
> - keycode 117 XF86ScrollDown
> - keycode 234 XF86Launch0
> - keycode 248 XF86Launch1  <-- This one doesn't work
>
> But when I run:
> evtest /dev/input/event9
> I get
> ...
> Event code 226 (KEY_MEDIA)
> Event code 240 (KEY_UNKNOWN) <-- minus 8 from the kernel?
> ...
>
> Pressing the XF86Launch1 (KEY_UNKNOWN) button dmesg gives:
> asus_laptop: Unknown key 9a pressed
>
> I added an udev hwdb rule to /etc/udev/hwdb.d/70-keyboard.hwdb
> evdev:name:Asus Laptop extra buttons:dmi:bvn*:bvr*:bd*:svnASUS:pn*pvr*
>   KEYBOARD_KEY_9a=prog1
>
> But when I add a shortcut with Gnome Keyboard settings. I can add the  
> key to an shortcut, but nothing happens when I press the button. When I  
> add one of the other buttons to a shortcut, they work as expected.
>
> Maybe someone has an idea to solve this problem?
>
> Floris
>

Still no success, but a little progress.

I made a hwdb rule in /etc/udev/hwdb.d/99-keyboard.hwdb
evdev:name:Asus Laptop extra buttons:dmi:bvn*:bvr*:bd*:svnASUS:pn*pvr*
  KEYBOARD_KEY_95=keyboard
  KEYBOARD_KEY_9a=screen

after an udevadm update and trigger udevadm info /dev/input/event5 reports  
the buttons:
...
E: ID_PATH_TAG=platform-asus_laptop
E: KEYBOARD_KEY_6b=f21				<-- This one is a default udev hwdb rule
E: KEYBOARD_KEY_95=keybaord
E: KEYBOARD_KEY_9a=screen
E: LIBINPUT_DEVICE_GROUP=19/0/0/0:asus_laptop
...

So far everything works as expected, but evtest doesn't remap the 9a key
...
type 4 (EV_MSC), code 4 (MSC_SCAN), value 95
type 1 (EV_KEY), code 374 (KEY_KEYBOARD), value 1		<-- This one is  
modified as expected
...
type 4 (EV_MSC), code 4 (MSC_SCAN), value 9a
type 1 (EV_KEY), code 240 (KEY_KEYBOARD), value 1		<-- Why isn't this one  
modified?
...

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Add unknown keyboard key Floris <jkfloris@dds.nl> - 2017-05-29 16:30 +0200
  Re: Add unknown keyboard key Floris <jkfloris@dds.nl> - 2017-06-08 14:30 +0200
    Re: Add unknown keyboard key Floris <jkfloris@dds.nl> - 2017-06-09 10:30 +0200

csiph-web