]> err.no Git - linux-2.6/commit
HID: Report usage codes of keys as EV_MSC scancode events
authorJiri Kosina <jkosina@suse.cz>
Mon, 20 Aug 2007 10:13:34 +0000 (12:13 +0200)
committerJiri Kosina <jkosina@suse.cz>
Sun, 14 Oct 2007 11:40:01 +0000 (13:40 +0200)
commitc01d50d181f074a60bf3ed54eb055ce1679afb98
tree5fc0bbf7c474160218b1159caf6db3bf76dad42b
parent82eb121989c06e3de33b56ade1fa52c9e86c014e
HID: Report usage codes of keys as EV_MSC scancode events

Current HID layer does not report usage codes to the input layer. This feature
was previously removed, because it caused unnecessary storm of events in cases
of positioning devices, etc.

This patch adds reporting of usage codes as EV_MSC events only for key events.
We issue the EV_MSC event only if the state of the key corresponding to the
given code has changed, so that we don't report usages that are sent in every
report even if the state hasn't changed (for example Shift/Caps Lock/...
states as sent by various keyboards).

This functionality is required at least by KeyTouch in order to provide
convenient means for remapping the usage codes.

Cc: Marvin Raaijmakers <marvin.nospam@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-input.c