From e48aa2a4027d52f8ca3eed5087e8438d0f931518 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Wed, 1 Jan 2014 17:22:17 +0100 Subject: Support discovery of key evdev devices. Change-Id: Iac2751b51fb0af9fba181c26ad788f25eb0b02f7 Done-with: Andrew den Exter Reviewed-by: Laszlo Agocs --- src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp index ac902b4140..8a0a0f43ac 100644 --- a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp +++ b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp @@ -130,8 +130,10 @@ QStringList QDeviceDiscovery::scanConnectedDevices() udev_enumerate_add_match_property(ue, "ID_INPUT_TOUCHPAD", "1"); if (m_types & Device_Touchscreen) udev_enumerate_add_match_property(ue, "ID_INPUT_TOUCHSCREEN", "1"); - if (m_types & Device_Keyboard) + if (m_types & Device_Keyboard) { udev_enumerate_add_match_property(ue, "ID_INPUT_KEYBOARD", "1"); + udev_enumerate_add_match_property(ue, "ID_INPUT_KEY", "1"); + } if (m_types & Device_Tablet) udev_enumerate_add_match_property(ue, "ID_INPUT_TABLET", "1"); @@ -242,6 +244,9 @@ bool QDeviceDiscovery::checkDeviceType(udev_device *dev) } } + if ((m_types & Device_Keyboard) && (qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_KEY"), "1") == 0 )) + return true; + if ((m_types & Device_Mouse) && (qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_MOUSE"), "1") == 0)) return true; -- cgit v1.2.3