1

I was using the old udev rules to remap my usb foot switch key(the default is the keycode 36 -b :S) to Alt_L. Previosly I created a udev rule and a xmodmap file. But i'm trying the systemd now, and the old style keymaps are gone.

My usb foot switch is the following(lsusb output):

0c45:7403 Microdia Foot Switch

In my old udev files, i had the following content:

/etc/udev/rules.d/95-keymap.rules

"ENV{ID_VENDOR_ID}=="0c45", ENV{ID_MODEL_ID}=="7403", RUN+="keymap $name microdia"

/lib/udev/keymaps/microdia

0x70005 F13

~/.Xmodmap

keycode 191 = Alt_L Meta_L Alt_L Meta_L

So, when I was pulling the switch the effect is that the key 'ALT_L' was pressed. How can i reproduce the same setup with the systemd/udev hwdb?

Thanks in advance.

arthas_dk
  • 111

1 Answers1

0

Create a file like /etc/udev/hwdb.d/95-microdia.hwdb containing

evdev:input:b0003v0c45p7403*
 KEYBOARD_KEY_70005=f13

The evdev line was obtained from /sys/class/input/event23/device/modalias (though the '23' will probably be different for you) and the scancode you already had, but could be obtained using evtest.

I know I'm coming to this (10 years) late, but had to do this on Arch Linux with pedals that were typing a, b, and c instead of being useful. I ran across you question and it provided the hint that hwdb was the way to go, but was still unanswered.

Greyson
  • 101