0

I've written a file /etc/udev/hwdb.d/70-keyboard.hwdb to re-map some of my keyboard keys. There's an additional key that I want to re-map, but I can't figure out what identifier I should use for it.

Ordinarily, I run evtest and press keyboard keys to get an output like the following:

Event: time 1639158329.532434, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7000f
Event: time 1639158329.532434, type 1 (EV_KEY), code 38 (KEY_L), value 1

Then I use the hex "value" from the first line above (containing "EV_MSC") to compose a line like the following in my 70-keyboard.hwdb file:

 KEYBOARD_KEY_7000f=rightctrl

The key that I want to re-map now is my KEY_KBDILLUMDOWN key, and when I run evtest to identify its hex value, I only get one line of output, and it's not the line that contains "EV_MSC":

Event: time 1639158417.741165, type 1 (EV_KEY), code 229 (KEY_KBDILLUMDOWN), value 1

How can I remap this key in udev?

1 Answer 1

0

Perhaps this key event is injected by ACPI driver (instead of real key press event) in which case you may handle it by acpid. Try acpi_listen (while acpid is running). Events handlers are at /etc/acpi/events/ which are calling handlers (default is right in /etc/acpi/).

If that is the case you can write a simple evdev wrapper script to generate keypress events as handler to acpi events. See here for examples.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.