@@ -19,6 +19,7 @@ import QtQuick.Window 2.2
19import Unity.InputInfo 0.1
19import Unity.InputInfo 0.1
20import Unity.Session 0.1
20import Unity.Session 0.1
21import Unity.Screens 0.1
21import Unity.Screens 0.1
22import GSettings 1.0
23import GSettings 1.0
23import "Components"
24import "Components"
24import "Rotation"
25import "Rotation"
@@ -84,6 +85,30 @@ Rectangle {
84 deviceFilter: InputInfo.TouchScreen
85 deviceFilter: InputInfo.TouchScreen
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.
92+ property bool blacklistedDevicePresent: false
93+ property var blacklistedDeviceList: ["py-evdev-uinput"]
94+ UnitySortFilterProxyModel {
95+ id: blacklistedDevices
96+ model: keyboardsModel
98+ root.blacklistedDevicePresent = blacklistedDevicePresent();
101+ function blacklistedDevicePresent() {
102+ for(var i = 0; i < count; i++) {
103+ var device = get(i);
104+ if (blacklistedDeviceList.indexOf(device.name) != -1) {
87 Screens {
112 Screens {
88 id: screens
113 id: screens
@@ -195,7 +220,8 @@ Rectangle {
195 // have multiple keyboards around. For now we only enable one keyboard at a time
220 // have multiple keyboards around. For now we only enable one keyboard at a time
196 // thus hiding it here if there is a physical one around or if we have a second
221 // thus hiding it here if there is a physical one around or if we have a second
197 // screen (the virtual touchpad & osk on the phone) attached.
222 // 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
200 // TODO: Factor in the connected input devices (eg: physical keyboard, mouse, touchscreen),
226 // TODO: Factor in the connected input devices (eg: physical keyboard, mouse, touchscreen),
201 // what's the output device (eg: big TV, desktop monitor, phone display), etc.
227 // what's the output device (eg: big TV, desktop monitor, phone display), etc.