basically each of the following: fn+f2 or fn+f3 (not even being recognised by evtest ) and the lid being closed or opened is being reported as “Event: time 1692812642.988180, type 1 (EV_KEY), code 238 (KEY_WLAN), value 1”.
so I though about remapping “Event: time 1692812642.988180, type 4 (EV_MSC), code 4 (MSC_SCAN), value d7” as the closing lid thingy
the same for fn+f2 and fn+f3 (increase and decrease brightness) I have to remap this “Event: time 1692812647.457821, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab” so my question is I can remap the keyboard here 60-keyboard.hwdb but where can I remap the ev_msc stuff
basically all this to say I want to tell udev that the msc this with id d7 is actually the toggle for closing the lid and the msc thing with id ab are actually the two buttons that increase and decrease brightness and yeah that’s all
If you run
sudo dmesg -w
it should tell you the scancodes that each of those events is triggering. You can then create a /etc/udev/hwdb.d/50-my-device.hwdb file to map those scan codes to keycodes.Here’s an example of a .hwdb file I made for Ayaneo handhelds:
## AYANEO DEVICES evdev:name:AT Translated Set 2 keyboard:dmi:*:svnAYANEO:* KEYBOARD_KEY_66=f15 KEYBOARD_KEY_67=f16 KEYBOARD_KEY_68=f17
You can find the appropriate evdev:* information by running
sudo udevadm test /dev/input/eventX
where eventX is the evdev fd for the device in question. evtest will show you the names.