Skip to content
  • Laércio de Sousa's avatar
    config/udev: distinguish between real keyboards and other key devices · daa6d2d5
    Laércio de Sousa authored and Adam Jackson's avatar Adam Jackson committed
    
    
    This patch introduces a new flag ATTR_KEY for hotplugged input devices,
    so we can better distinguish between real keyboards (i.e. devices with
    udev property ID_INPUT_KEYBOARD="1") and other key input devices like
    lid switches, power buttons, etc.
    
    All supported hotplug backends (udev, hal, and wscons) will set both
    flags ATTR_KEY and ATTR_KEYBOARD for real keyboards, but udev backend
    will set ATTR_KEY, but not ATTR_KEYBOARD, for non-keyboard key input
    devices (hal and wscons will set both flags in any case). With this
    distinction, kdrive input hotplugging mechanism will be allowed to only
    grab real keyboards, as other key input devices are currently not
    supported.
    
    In order to don't break current behaviour, this patch will replace all
    ATTR_KEYBOARD occurrences with ATTR_KEY in hw/xfree86/common/xf86Xinput.c.
    
    [ajax: Just add ATTR_KEY, don't re-number the other attributes]
    
    Reviewed-by: default avatarAdam Jackson <ajax@redhat.com>
    Signed-off-by: default avatarLaércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
    daa6d2d5