]> err.no Git - systemd/commitdiff
keymap: Only run on key devices
authorMartin Pitt <martin.pitt@ubuntu.com>
Wed, 20 Jul 2011 10:49:40 +0000 (12:49 +0200)
committerMartin Pitt <martin.pitt@ubuntu.com>
Wed, 20 Jul 2011 10:52:28 +0000 (12:52 +0200)
Skip event devices which don't have ID_INPUT_KEY set, to avoid running the long
list of rules more than necessary.

Note that we don't limit ourselves to ID_INPUT_KEYBOARD, as we might want to
fix extra buttons on e. g. fancy mouses or tablet screens, too.

extras/keymap/95-keymap.rules

index 39d232202036d0b7e749386e9d5f83e4e47fdf8c..6f1b99555efb4d14bdab5f489ced00d6e3df0acb 100644 (file)
@@ -6,8 +6,8 @@
 # pairs.
 
 ACTION=="remove", GOTO="keyboard_end"
-SUBSYSTEM!="input", GOTO="keyboard_end"
 KERNEL!="event*", GOTO="keyboard_end"
+ENV{ID_INPUT_KEY}=="", GOTO="keyboard_end"
 SUBSYSTEMS=="bluetooth", GOTO="keyboard_end"
 
 SUBSYSTEMS=="usb", ENV{ID_VENDOR}=="", IMPORT{program}="usb_id --export %p"