Re: Why udevadm-info result doesn't sync with input_id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



æ äï2011-03-08 æ 11:27 +0000ïjoeyli(Joey Lee) æåï
> Hi all,
> 
> Found udevadmin info result for ID_INPUT_KEY not sync with input_id,
> this issue happen on udev v157 and v166.
> 
> I generated a new patch for msi-laptop driver to send out
> KEY_TOUCHPAD_ON, KEY_TOUCHPAD_OFF key:
> 
> http://www.spinics.net/lists/platform-driver-x86/msg01543.html
> 
> I only added the KEY_TOUCHPAD_ON and KEY_TOUCHPAD_OFF in keymap in
> msi-laptop driver.
> Then, I add a statement to /lib/udev/rules.d/95-keymap.rules:
> 
> ENV{DMI_VENDOR}=="MICRO-STAR*", KERNELS=="input*", ATTRS{name}=="MSI
> Laptop hotkeys", RUN+="keymap $name 0x213 f22 0x214 f23"
> 
> The above rule transfer the 0x213 scancode to F22, and 0x214 to F23 for
> KEY_TOUCHPAD_ON AND KEY_TOUCHPAD_OFF.
> 
> I found X-window always didn't pick out msi-laptop's input device to a
> keyboard device by evdev driver, because there have no ID_INPUT_KEY for
> this event node:
> 
> linux-xlzb:~ # udevadm info --q all -n /dev/input/event7
> P: /devices/virtual/input/input7/event7
> N: input/event7
> S: char/13:71
> E: UDEV_LOG=3
> E: DEVPATH=/devices/virtual/input/input7/event7
> E: SUBSYSTEM=input
> E: DEVNAME=input/event7
> E: ID_INPUT=1
> E: DMI_VENDOR=MICRO-STAR INTERNATIONAL CO., LTD
> E: MAJOR=13
> E: MINOR=71
> E: DEVLINKS=/dev/char/13:71
> 
> But, 
> found there have ID_INPUT_KEY in input_id's result:
> 
> linux-xlzb:~ # /lib/udev/input_id /devices/virtual/input/input7
> ID_INPUT=1
> ID_INPUT_KEY=1
> 
> On udev v157, there have no ID_INPUT_KEY property in udev database:
> 
> linux-xlzb:~ # cat /dev/.udev/db/input\:event7 
> N:input/event7
> S:char/13:71
> E:ID_INPUT=1
> E:DMI_VENDOR=MICRO-STAR INTERNATIONAL CO., LTD
> 
> 
> The question is: 
> 
> Why there have ID_INPUT_KEY from input_id's result, but have no
> ID_INPUT_KEY from udevadm-info? Does that
> mean /dev/.udev/db/input/event7 not sync with /input7/capabilities/key ?
> 
> 
> Appreciate for any kindly response.
> 
> 

I thought I know what happen, because the input_id not support the 256.
The new KEY_TOUCHPAD_* define in input.h are all larger then 255, 
I direct add a rule to merge ID_INPUT_KEY=1 to MSI hotkeys device, can
workaround the problem. Will send out patch to 95-keymap.rules.

Just wonder why input_id only support keycode to 255 but not support to
KEY_MAX.


Thank's a lot!
Joey Lee

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux