Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 2461

General discussion • I'm baffled by evdev, keys, keycodes can someone help

$
0
0
I have a bluetooth remote device that sends key events to my Pi 5
I have a button on the device that is reported in evtest thus:

Code:

type 1 (EV_KEY), code 116 (KEY_POWER), value 1
It was powering off my Pi but I have solved that by editing /usr/share/X11/xkb/symbols/inet and modifying the line:

Code:

key <POWR>   {      [ XF86AudioMute         ]       }; 
(I changed POWR to XF86AudioMute)
Now my Pi no longer powers off and in python, using pyinput the button is reported as:

Code:

Key.media_volume_mute
That's fine but I have another key on the device that in evtest shows up as:

Code:

type 1 (EV_KEY), code 172 (KEY_HOMEPAGE), value 1
but in pyinput it only shows up as <269025048>
I believe I need to map it somehow but I am bewildered as to how this all works. Can someone give me a hand?

Statistics: Posted by jimseng — Fri Mar 28, 2025 12:05 am



Viewing all articles
Browse latest Browse all 2461

Trending Articles