@@ -19,6 +19,7 @@ import QtQuick.Window 2.2
1919import Unity.InputInfo 0.1
2020import Unity.Session 0.1
2121import Unity.Screens 0.1
22+import Utils 0.1
2223import GSettings 1.0
2324import "Components"
2425import "Rotation"
@@ -84,6 +85,30 @@ Rectangle {
8485 deviceFilter: InputInfo.TouchScreen
8586 }
8687
88+ /* FIXME: This is a work arround for lp:1542224.
89+ * When QInputInfo exposes NameRole to QML, the filtering should
90+ * happen in the backend.
91+ */
92+ property bool blacklistedDevicePresent: false
93+ property var blacklistedDeviceList: ["py-evdev-uinput"]
94+ UnitySortFilterProxyModel {
95+ id: blacklistedDevices
96+ model: keyboardsModel
97+ onCountChanged: {
98+ root.blacklistedDevicePresent = blacklistedDevicePresent();
99+ }
100+
101+ function blacklistedDevicePresent() {
102+ for(var i = 0; i < count; i++) {
103+ var device = get(i);
104+ if (blacklistedDeviceList.indexOf(device.name) != -1) {
105+ return true;
106+ }
107+ }
108+ return false;
109+ }
110+ }
111+
87112 Screens {
88113 id: screens
89114 }
@@ -195,7 +220,8 @@ Rectangle {
195220 // have multiple keyboards around. For now we only enable one keyboard at a time
196221 // thus hiding it here if there is a physical one around or if we have a second
197222 // screen (the virtual touchpad & osk on the phone) attached.
198− oskEnabled: keyboardsModel.count === 0 && screens.count === 1
223+ oskEnabled: (keyboardsModel.count === 0 && screens.count === 1) ||
224+ blacklistedDevicePresent
199225
200226 // TODO: Factor in the connected input devices (eg: physical keyboard, mouse, touchscreen),
201227 // what's the output device (eg: big TV, desktop monitor, phone display), etc.