/
98-eventlircd.rules
173 lines (136 loc) · 7.3 KB
/
98-eventlircd.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
################################################################################
# An example udev rules file for eventlircd.
#
# This rules file does not start eventlircd. Many applications only check for
# the lircd socket at application lauch. Therefore, it is better to start
# eventlircd in an init script so that eventlircd creates the lircd socket
# before any applications that use LIRC launch.
################################################################################
# eventlircd only does something for "add" and "remove" actions.
ACTION!="add|remove", GOTO="end"
# eventlircd only does something "input" subsystem devices.
SUBSYSTEM!="input", GOTO="end"
# eventlircd can only handle event devices.
KERNEL!="event[0-9]*", GOTO="end"
# eventlircd ignores devices created by eventlircd.
ATTRS{name}=="eventlircd", GOTO="end"
#-------------------------------------------------------------------------------
# Ask eventlircd to handle input event devices created by lircd. For this to
# work, lircd must be configured to output Linux input events and must be
# configured to output key names that conform to the LIRC namespace derived from
# the Linux key/button event names. This rule assumes that lircd performs all
# key mappings, so the rule does not provide a value for "eventlircd_evmap".
# For more information on lircd, see <http://www.lirc.org/>.
#-------------------------------------------------------------------------------
ATTRS{name}=="lircd", \
ENV{eventlircd_enable}="true"
#-------------------------------------------------------------------------------
# Ask eventlircd to handle input event devices created by irserver2uinput.
#-------------------------------------------------------------------------------
ATTRS{name}=="irserver2uinput", \
ENV{eventlircd_enable}="true"
#-------------------------------------------------------------------------------
# Ask eventlircd to handle input event devices created by bdremoteng. For this
# to work, bdremoteng must be configured to output Linux input events and must
# be configured to output key names that conform to LIRC namespace derived
# from the Linux key/button event names. For more information on bdremoteng,
# see <http://code.google.com/p/bdremote-ng/>.
#-------------------------------------------------------------------------------
ATTRS{name}=="bdremoteng", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="bdremoteng.evmap"
#-------------------------------------------------------------------------------
# Ask eventlircd to handle input event devices created by wminput. This rule
# assumes that wminput performs all key mappings, so the rule does not provide a
# value for "eventlircd_evmap" For more information on wminput, see
# <http://abstrakraft.org/cwiid/>.
#-------------------------------------------------------------------------------
ATTRS{name}=="bdremoteng", \
ENV{eventlircd_enable}="true"
#-------------------------------------------------------------------------------
# Ask eventlircd to handle input event devices created by ir-core (kernel).
#-------------------------------------------------------------------------------
SUBSYSTEMS=="rc", \
ENV{eventlircd_enable}="true"
#-------------------------------------------------------------------------------
# overwrites for ircore mapping
#-------------------------------------------------------------------------------
SUBSYSTEM=="input", ATTRS{idVendor}=="1c73", ATTRS{idProduct}=="861f", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="anysee.evmap"
#-------------------------------------------------------------------------------
# Ask eventlircd to handle USB HID devices that show up as event devices and are
# known to be remote controls. For simplicity, the event map file names have the
# format <BUSTYPE>_<VENDOR>_<PRODUCT>.evmap.
#-------------------------------------------------------------------------------
SUBSYSTEMS=="usb", GOTO="begin-usb"
GOTO="end-usb"
LABEL="begin-usb"
ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"
ENV{ID_VENDOR_ID}=="0419", ENV{ID_MODEL_ID}=="0001", \
ENV{eventlircd_enable}="true",\
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="05a4", ENV{ID_MODEL_ID}=="9881", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="hama-mce.evmap"
ENV{ID_VENDOR_ID}=="4243", ENV{ID_MODEL_ID}=="ee08", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="1934", ENV{ID_MODEL_ID}=="5168", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="0755", ENV{ID_MODEL_ID}=="2626", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="045e", ENV{ID_MODEL_ID}=="006d", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="0766", ENV{ID_MODEL_ID}=="0204", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="1241", ENV{ID_MODEL_ID}=="e000", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="147a", ENV{ID_MODEL_ID}=="e02d", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="mce.evmap"
ENV{ID_VENDOR_ID}=="147a", ENV{ID_MODEL_ID}=="e03a", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="mce.evmap"
ENV{ID_VENDOR_ID}=="0c16", ENV{ID_MODEL_ID}=="0002", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="04_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="0755", ENV{ID_MODEL_ID}=="2626", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="0471", ENV{ID_MODEL_ID}=="060c", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="0471", ENV{ID_MODEL_ID}=="0815", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="18b1", ENV{ID_MODEL_ID}=="0037", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="04b4", ENV{ID_MODEL_ID}=="0100", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="04b4", ENV{ID_MODEL_ID}=="0101", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="1d57", ENV{ID_MODEL_ID}=="ac01", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ENV{ID_VENDOR_ID}=="22b8", ENV{ID_MODEL_ID}=="003b", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
ATTRS{idVendor}=="2040", ATTRS{idProduct}=="9301", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="03_$attr{idVendor}_$attr{idProduct}.evmap"
ENV{ID_VENDOR_ID}=="1784", ENV{ID_MODEL_ID}=="0004", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="default.evmap"
# Enable wake-on-usb for the USB remotes.
ENV{eventlircd_enable}=="true", RUN+="wakeup_enable"
LABEL="end-usb"
LABEL="end"