You are not logged in.
Pages: 1
I have USB keyboard with multimedia keys defined as combination of Fn key plus function keys F1-F12.
Two keys work as expected KEY_CONFIG and KEY_CALC the others dont work, for example KEY_VOLUMEDOWN.
At first I was thinking that mapping from scancodes to keycodes is not OK. I was following https://wiki.archlinux.org/title/Map_sc … o_keycodes and defined file /etc/udev/hwdb.d/90-modecom-keyboard.hwdb with content:
evdev:input:b0003:v0c45p7603*
KEYBOARD_KEY_c0183=config
KEYBOARD_KEY_c00ea=volumedown
KEYBOARD_KEY_c00e9=volumeup
KEYBOARD_KEY_c00e2=mute
KEYBOARD_KEY_c00b7=stopcd
KEYBOARD_KEY_c00b6=previoussong
KEYBOARD_KEY_c00cd=playpause
KEYBOARD_KEY_c00b5=nextsong
KEYBOARD_KEY_c018a=mail
KEYBOARD_KEY_c0223=homepage
KEYBOARD_KEY_c0192=calcI get the scancodes from evtest, names for keycodes from /usr/include/linux/input-event-codes.h
I have updated the hardware database with "systemd-hwdb update" reload database index with "udevadm trigger" but "udevadm info /dev/input/by-path/*-usb-*-kbd | grep KEYBOARD_KEY" gives nothing. Also the output of evtest and xev are the same. The output for the KEY_CONFIG from evtest is:
Event: time 1705615044.011566, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183
Event: time 1705615044.011566, type 1 (EV_KEY), code 171 (KEY_CONFIG), value 1
Event: time 1705615044.011566, -------------- SYN_REPORT ------------
Event: time 1705615044.115567, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183
Event: time 1705615044.115567, type 1 (EV_KEY), code 171 (KEY_CONFIG), value 0
Event: time 1705615044.115567, -------------- SYN_REPORT ------------The output from xev for the same key:
KeyPress event, serial 48, synthetic NO, window 0x2200001,
root 0x274, subw 0x0, time 2335800, (126,-370), root:(374,389),
state 0x0, keycode 179 (keysym 0x1008ff81, XF86Tools), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 49, synthetic NO, window 0x2200001,
root 0x274, subw 0x0, time 2335928, (126,-370), root:(374,389),
state 0x0, keycode 179 (keysym 0x1008ff81, XF86Tools), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: FalseThe output for the KEY_VOLUMEDOWN (Not working key) from evtest:
Testing ... (interrupt to exit)
Event: time 1705615407.616235, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00ea
Event: time 1705615407.616235, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 1705615407.616235, -------------- SYN_REPORT ------------
Event: time 1705615407.784241, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00ea
Event: time 1705615407.784241, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 1705615407.784241, -------------- SYN_REPORT ------------Output from xev for the same key:
KeymapNotify event, serial 49, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0I don't know how to diagnose the problem.
Last edited by barney (2024-01-19 00:07:31)
Offline
You get a KeymapNotify because the key is passively grabbed (by some shortcut daemon)
The key works, what does not work is whatever action it's bound to.
sleep5; xdotool key "XF86LogGrabInfo"Press the key and hold it until xdotool fired.
The grabs are then logged into your xorg log, the volume down key should be the active grab and the log will also tell what PID (and ideally executable) holds the grab.
Online
I don't know how to interpret the logs. Here is my xorg log:
http://0x0.st/H0yO.txt
I have OpenBox installed with xfce4-panel. Explicitly I didn't installed any shortcut daemon. I don't have any other desktop environment or window manager installed.
EDIT: I didn't look well. The pulseaudio plugin for xfce4-panel is the application that is responsible for the grab. You are right the key is working, but changing the volume in the mixer almost does nothing. The change in volume from 0% to 100% is barely noticeable.
Last edited by barney (2024-01-18 23:50:13)
Offline
Pages: 1