SHARE
TWEET

Untitled

a guest Jul 25th, 2016 272 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ################################################################################
  2. # An example udev rules file for eventlircd.
  3. #
  4. # This rules file does not start eventlircd. Many applications only check for
  5. # the lircd socket at application lauch. Therefore, it is better to start
  6. # eventlircd in an init script so that eventlircd creates the lircd socket
  7. # before any applications that use LIRC launch.
  8. ################################################################################
  9.  
  10. # eventlircd only does something for "add" and "remove" actions.
  11. ACTION!="add|remove", GOTO="end"
  12.  
  13. # eventlircd only does something "input" subsystem devices.
  14. SUBSYSTEM!="input", GOTO="end"
  15.  
  16. # eventlircd can only handle event devices.
  17. KERNEL!="event[0-9]*", GOTO="end"
  18.  
  19. # eventlircd ignores devices created by eventlircd.
  20. ATTRS{name}=="eventlircd", GOTO="end"
  21.  
  22. #-------------------------------------------------------------------------------
  23. # Ask eventlircd to handle input event devices created by lircd. For this to
  24. # work, lircd must be configured to output Linux input events and must be
  25. # configured to output key names that conform to the LIRC namespace derived from
  26. # the Linux key/button event names. This rule assumes that lircd performs all
  27. # key mappings, so the rule does not provide a value for "eventlircd_evmap".
  28. # For more information on lircd, see <http://www.lirc.org/>.
  29. #-------------------------------------------------------------------------------
  30. ATTRS{name}=="lircd", \
  31.   ENV{eventlircd_enable}="true"
  32.  
  33. #-------------------------------------------------------------------------------
  34. # Ask eventlircd to handle input event devices created by bdremoteng. For this
  35. # to work, bdremoteng must be configured to output Linux input events and must
  36. # be configured to output key names that conform to LIRC namespace derived
  37. # from the Linux key/button event names. For more information on bdremoteng,
  38. # see <http://code.google.com/p/bdremote-ng/>.
  39. #-------------------------------------------------------------------------------
  40. ATTRS{name}=="bdremoteng", \
  41.   ENV{eventlircd_enable}="true", \
  42.   ENV{eventlircd_evmap}="bdremoteng.evmap"
  43.  
  44. #-------------------------------------------------------------------------------
  45. # Ask eventlircd to handle input event devices created by wminput. This rule
  46. # assumes that wminput performs all key mappings, so the rule does not provide a
  47. # value for "eventlircd_evmap" For more information on wminput, see
  48. # <http://abstrakraft.org/cwiid/>.
  49. #-------------------------------------------------------------------------------
  50. ATTRS{name}=="bdremoteng", \
  51.   ENV{eventlircd_enable}="true"
  52.  
  53. #-------------------------------------------------------------------------------
  54. # Ask eventlircd to handle input event devices created by ir-core (kernel).
  55. #-------------------------------------------------------------------------------
  56. SUBSYSTEMS=="rc", \
  57.   ENV{eventlircd_enable}="true", \
  58.   ENV{eventlircd_evmap}="default.evmap"
  59.  
  60. #-------------------------------------------------------------------------------
  61. # Ask eventlircd to handle power button.
  62. #-------------------------------------------------------------------------------
  63. SUBSYSTEMS=="acpi", ATTRS{hid}=="LNXPWRBN", \
  64.   ENV{eventlircd_enable}="true", \
  65.   ENV{eventlircd_evmap}="default.evmap"
  66.  
  67. # WeTek Play (power button)
  68. SUBSYSTEMS=="input", ATTRS{name}=="key_input", \
  69.   ENV{eventlircd_enable}="true", \
  70.   ENV{eventlircd_evmap}="default.evmap"
  71.  
  72. # WeTek Core (power button)
  73. SUBSYSTEMS=="input", ATTRS{name}=="gpio_keypad", \
  74.   ENV{eventlircd_enable}="true", \
  75.   ENV{eventlircd_evmap}="default.evmap"
  76.  
  77. #-------------------------------------------------------------------------------
  78. # Ask eventlircd to handle USB HID devices that show up as event devices and are
  79. # known to be remote controls. For simplicity, the event map file names have the
  80. # format <BUSTYPE>_<VENDOR>_<PRODUCT>.evmap.
  81. #-------------------------------------------------------------------------------
  82. SUBSYSTEMS=="usb", GOTO="begin-usb"
  83. GOTO="end-usb"
  84. LABEL="begin-usb"
  85.  
  86. ENV{ID_USB_INTERFACES}=="", IMPORT{builtin}="usb_id"
  87.  
  88. ENV{ID_VENDOR_ID}=="0bc7", ENV{ID_MODEL_ID}=="0006", \
  89.   ENV{eventlircd_enable}="true", \
  90.   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  91.  
  92. ENV{ID_VENDOR_ID}=="0419", ENV{ID_MODEL_ID}=="0001", \
  93.   ENV{eventlircd_enable}="true", \
  94.   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  95.  
  96. ENV{ID_VENDOR_ID}=="046d", ENV{ID_MODEL_ID}=="c101", \
  97.   ENV{eventlircd_enable}="true", \
  98.   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  99.  
  100. ENV{ID_VENDOR_ID}=="046e", ENV{ID_MODEL_ID}=="5577", \
  101.   ENV{eventlircd_enable}="true", \
  102.   ENV{eventlircd_evmap}="topseed.evmap"
  103.  
  104. ENV{ID_VENDOR_ID}=="046e", ENV{ID_MODEL_ID}=="5578", \
  105.   ENV{eventlircd_enable}="true", \
  106.   ENV{eventlircd_evmap}="topseed.evmap"
  107.  
  108. ENV{ID_VENDOR_ID}=="04b4", ENV{ID_MODEL_ID}=="0100", \
  109.   ENV{eventlircd_enable}="true", \
  110.   ENV{eventlircd_evmap}="cypress.evmap"
  111.  
  112. ENV{ID_VENDOR_ID}=="04b4", ENV{ID_MODEL_ID}=="0101", \
  113.   ENV{eventlircd_enable}="true", \
  114.   ENV{eventlircd_evmap}="cypress.evmap"
  115.  
  116. ENV{ID_VENDOR_ID}=="04f2", ENV{ID_MODEL_ID}=="0618", \
  117.   ENV{eventlircd_enable}="true", \
  118.   ENV{eventlircd_evmap}="topseed.evmap"
  119.  
  120. ENV{ID_VENDOR_ID}=="0766", ENV{ID_MODEL_ID}=="0204", \
  121.   ENV{eventlircd_enable}="true", \
  122.   ENV{eventlircd_evmap}="topseed.evmap"
  123.  
  124. ENV{ID_VENDOR_ID}=="1784", ENV{ID_MODEL_ID}=="0004", \
  125.   ENV{eventlircd_enable}="true", \
  126.   ENV{eventlircd_evmap}="topseed.evmap"
  127.  
  128. ENV{ID_VENDOR_ID}=="03eb", ENV{ID_MODEL_ID}=="0002", \
  129.   ENV{eventlircd_enable}="true", \
  130.   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  131.  
  132. ENV{ID_VENDOR_ID}=="05a4", ENV{ID_MODEL_ID}=="9881", \
  133.   ENV{eventlircd_enable}="true", \
  134.   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  135.  
  136. # ENV{ID_VENDOR_ID}=="05ac", ENV{ID_MODEL_ID}=="8241", \
  137. #   ENV{eventlircd_enable}="true", \
  138. #   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  139.  
  140. ENV{ID_VENDOR_ID}=="0709", ENV{ID_MODEL_ID}=="9137", \
  141.   ENV{eventlircd_enable}="true", \
  142.   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  143.  
  144. ENV{ID_VENDOR_ID}=="0755", ENV{ID_MODEL_ID}=="2626", \
  145.   ENV{eventlircd_enable}="true", \
  146.   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  147.  
  148. ENV{ID_VENDOR_ID}=="1241", ENV{ID_MODEL_ID}=="e000", \
  149.   ENV{eventlircd_enable}="true", \
  150.   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  151.  
  152. ENV{ID_VENDOR_ID}=="13ec", ENV{ID_MODEL_ID}=="0006", \
  153.   ENV{eventlircd_enable}="true", \
  154.   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  155.  
  156. ENV{ID_VENDOR_ID}=="147a", ENV{ID_MODEL_ID}=="e02d", \
  157.   ENV{eventlircd_enable}="true", \
  158.   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  159.  
  160. ENV{ID_VENDOR_ID}=="18b1", ENV{ID_MODEL_ID}=="0037", \
  161.   ENV{eventlircd_enable}="true", \
  162.   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  163.  
  164. ENV{ID_VENDOR_ID}=="1d57", ENV{ID_MODEL_ID}=="ac01", \
  165.   ENV{eventlircd_enable}="true", \
  166.   ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap"
  167.  
  168. #ENV{ID_VENDOR_ID}=="9022", ENV{ID_MODEL_ID}=="d660", \
  169. ATTRS{idVendor}=="9022", ATTRS{idProduct}=="d660", \
  170.   ENV{eventlircd_enable}="true", \
  171.   ENV{eventlircd_evmap}="tevii_s660.evmap"
  172.  
  173. ENV{ID_VENDOR_ID}=="0471", ENV{ID_MODEL_ID}=="0613", \
  174.   ENV{eventlircd_enable}="true", \
  175.   ENV{eventlircd_evmap}="spinelplus.evmap"
  176.  
  177. ENV{ID_VENDOR_ID}=="0471", ENV{ID_MODEL_ID}=="206c", \
  178.   ENV{eventlircd_enable}="true", \
  179.   ENV{eventlircd_evmap}="spinelplus.evmap"
  180.  
  181. ENV{ID_VENDOR_ID}=="0471", ENV{ID_MODEL_ID}=="20cc", \
  182.   ENV{eventlircd_enable}="true", \
  183.   ENV{eventlircd_evmap}="spinelplus.evmap"
  184.  
  185. ENV{ID_VENDOR_ID}=="2252", ENV{ID_MODEL_ID}=="1037", \
  186. ENV{eventlircd_enable}="true", \
  187. ENV{eventlircd_evmap}="osmc_rf.evmap"
  188.  
  189. # Enable wake-on-usb for the USB remotes.
  190.   RUN+="wakeup_enable"
  191.  
  192. LABEL="end-usb"
  193.  
  194. # Automatically set Delayrate to 200ms to avoid double keypresses with
  195. # gpio-rc-recv
  196.   DRIVERS=="gpio-rc-recv", \
  197.     RUN+="/usr/bin/ir-keytable --delay=200 --device=$devnode", \
  198.     GOTO="end-keytable"
  199.  
  200. # Set default delays (1000ms for first repeat, to avoid multiple keypresses).
  201.   RUN+="/usr/bin/ir-keytable --delay=1000 --device=$devnode"
  202.  
  203. LABEL="end-keytable"
  204. #-------------------------------------------------------------------------------
  205. # Ask eventlircd to handle Bluetooth HID devices that show up as event devices
  206. # and are known to be remote controls. For simplicity, the event map file names
  207. # have the format <BUSTYPE>_<VENDOR>_<PRODUCT>.evmap.
  208. #-------------------------------------------------------------------------------
  209. SUBSYSTEMS=="bluetooth", GOTO="begin-bluetooth"
  210. GOTO="end-bluetooth"
  211. LABEL="begin-bluetooth"
  212.  
  213. ATTRS{name}=="Nintendo Wii Remote", \
  214.   ENV{eventlircd_enable}="true", \
  215.   ENV{eventlircd_evmap}="wiimote.evmap"
  216.  
  217. ATTRS{name}=="BD Remote Control", \
  218.   ENV{eventlircd_enable}="true", \
  219.   ENV{eventlircd_evmap}="ps3remote.evmap"
  220.  
  221. #PS3 BD Remote Version 2 (Bluetooth AND infrared 3 in 1 remote)
  222. ATTRS{name}=="Sony Computer Entertainment Inc BD Remote Control", \
  223.   ENV{eventlircd_enable}="true", \
  224.   ENV{eventlircd_evmap}="ps3remote.evmap"
  225.  
  226. LABEL="end-bluetooth"
  227.  
  228. LABEL="end"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top