chiark / gitweb /
rules: fix input-name for keyboard rules
authorDavid Herrmann <dh.herrmann@gmail.com>
Fri, 20 Mar 2015 09:44:21 +0000 (10:44 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Fri, 20 Mar 2015 09:45:42 +0000 (10:45 +0100)
We match on the evdev node, but only the parent has a "name" attribute.
Use $attr{device/name} to access it.

This is borked since 2013, I wonder how that ever worked? Maybe this will
suddenly fix all the DMI-based key detections.

Thanks to Peter Hutterer for catching this!

rules/60-keyboard.rules

index fcb948ac028d69cc25e4724e148eee5696c38c5c..af3edb5f58fa9708ceed28128da4765156a45aca 100644 (file)
@@ -13,7 +13,7 @@ DRIVERS=="atkbd", IMPORT{builtin}="hwdb 'keyboard:atkbd:$attr{[dmi/id]modalias}'
   RUN{builtin}+="keyboard", GOTO="keyboard_end"
 
 # device matching the input device name and the machine's DMI data
-IMPORT{builtin}="hwdb 'keyboard:name:$attr{name}:$attr{[dmi/id]modalias}'", \
+IMPORT{builtin}="hwdb 'keyboard:name:$attr{device/name}:$attr{[dmi/id]modalias}'", \
   RUN{builtin}+="keyboard", GOTO="keyboard_end"
 
 LABEL="keyboard_end"