summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>2016-02-12 14:18:02 -0200
committerAdam Jackson <ajax@redhat.com>2016-03-01 10:46:48 -0500
commitdaa6d2d58f65b9301b1b1f3c6df07719ecb5c03d (patch)
tree8d73d57fc4359ed5869c3a81301e0744a42d43f5 /include
parent851ff9ec04b73412c7dbad7b4911a1feac21f354 (diff)
config/udev: distinguish between real keyboards and other key devices
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: Adam Jackson <ajax@redhat.com> Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Diffstat (limited to 'include')
-rw-r--r--include/input.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/input.h b/include/input.h
index d8bd9c602..966212305 100644
--- a/include/input.h
+++ b/include/input.h
@@ -236,6 +236,7 @@ typedef struct _InputAttributes {
#define ATTR_TABLET (1<<3)
#define ATTR_TOUCHPAD (1<<4)
#define ATTR_TOUCHSCREEN (1<<5)
+#define ATTR_KEY (1<<6)
/* Key/Button has been run through all input processing and events sent to clients. */
#define KEY_PROCESSED 1