0

So I have an Acer Nitro laptop that I installed debian bookworm on running cinnamon DE. This laptop has a special "Nitro Sense" key by the numpad. When you push this key in windows, acer's bloat shits all over the machine, but on linux it sends keycode 425(KEY_PRESENTATION).

I want this key to open a terminal, so I attempted to make an xmodmap config, but it seems to be the case that only keycodes between 0-255 can work there. I know this because in /usr/share/X11/xkb/keycodes/evdev this is defined:

// Key codes below cannot be used in X
<I433> = 433;           // #define KEY_PRESENTATION        425

So now im attempting to use udev to remap KEY_PRESENTATION to one of the 4 KEY_PROG keys and im not having much luck.

I am making a new file /etc/udev/hwdb.d/99-acer-nitro-nitrosense-key-remap.hwdb with this inside:

evdev:input:b0011v0001p0001eAB41*
 KEYBOARD_KEY_f5=prog3

I built the input based on the output from my device's bustype, product, vendor, and version:

$ ls /sys/class/input/event0/device/id
bustype  product  vendor  version

$ cat /sys/class/input/event0/device/id/* 
0011 
0001 
0001 
ab41

I then run these commands, update initramfs, and restart the machine:

systemd-hwdb update 
(i have also tried running: udevadm hwdb --update)

udevadm trigger /dev/input/event0

but after restarting the machine, when I run udevadm info /sys/class/input/event0 I see this line KEYBOARD_KEY_f5=presentation instead of KEYBOARD_KEY_f5=prog3

I am using KEYBOARD_KEY_f5 because when I run evtest I get this output when I hit the key:

Event: time 1675476830.534080, -------------- SYN_REPORT ------------
Event: time 1675476831.052993, type 4 (EV_MSC), code 4 (MSC_SCAN), value f5
Event: time 1675476831.052993, type 1 (EV_KEY), code 425 (KEY_PRESENTATION), value 1
Event: time 1675476831.052993, -------------- SYN_REPORT ------------
Event: time 1675476831.166335, type 4 (EV_MSC), code 4 (MSC_SCAN), value f5
Event: time 1675476831.166335, type 1 (EV_KEY), code 425 (KEY_PRESENTATION), value 0
Event: time 1675476831.166335, -------------- SYN_REPORT ------------

I am at a loss as to what to attempt next. any help would be greatly appreciated.

1 Answer 1

0

Your keyboard probably counts as an AT keyboard, not a USB keyboard (run sudo evemu-describe to be sure). Just write a rule that applies to any AT keyboard:

evdev:atkbd:*
 KEYBOARD_KEY_f5=prog3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .