chiark / gitweb /
do not complain about a missing /etc/udev/rules.d/
[elogind.git] / rules / rules.d / 60-persistent-input.rules
1 # do not edit this file, it will be overwritten on update
2
3 ACTION!="add|change", GOTO="persistent_input_end"
4 SUBSYSTEM!="input", GOTO="persistent_input_end"
5 KERNEL=="input[0-9]*", GOTO="persistent_input_end"
6
7 # usb devices
8 SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export"
9 SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ENV{ID_CLASS}="kbd"
10 SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ENV{ID_CLASS}="mouse"
11
12 # other devices
13 DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr"
14 DRIVERS=="atkbd", ENV{ID_CLASS}="kbd"
15 DRIVERS=="psmouse", ENV{ID_CLASS}="mouse"
16 ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir"
17 # joystick (ABS_X || ABS_WHEEL || ABS_THROTTLE) && !BTN_TOUCH
18 ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", ATTRS{modalias}!="input:*-*k*14A,*r*", ENV{ID_CLASS}="joystick"
19
20 # fill empty serial number
21 ENV{ID_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
22
23 # by-id links
24 KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
25 KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"
26
27 # by-path
28 IMPORT{program}="path_id %p"
29 ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
30 ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}"
31
32 LABEL="persistent_input_end"
33