HID: Report usage codes of keys as EV_MSC scancode events
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 <c04f85874734d867b02a3b7b9963cd37d4c14100@gmail.com>
Signed-off-by: Jiri Kosina <ed58f755cc8caaf10c3e8c731a8b86fb8f13d6cb@suse.cz>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs