diff options
author | Robin Burchell <robin.burchell@jollamobile.com> | 2014-01-01 17:22:17 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-06 20:55:47 +0100 |
commit | e48aa2a4027d52f8ca3eed5087e8438d0f931518 (patch) | |
tree | f68adbb1490953c330e4ed63ac9cc5085db2cfde | |
parent | f956ffa9ccdee471752913f8ae5c7e7f57435b8a (diff) |
Support discovery of key evdev devices.
Change-Id: Iac2751b51fb0af9fba181c26ad788f25eb0b02f7
Done-with: Andrew den Exter <andrew.den.exter@jollamobile.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
-rw-r--r-- | src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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; |