Skip to content
  • Jiri Kosina's avatar
    HID: Report usage codes of keys as EV_MSC scancode events · c01d50d1
    Jiri Kosina authored
    
    
    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: default avatarJiri Kosina <jkosina@suse.cz>
    c01d50d1