@@ -89,19 +89,24 @@ Rectangle {
8989 * When QInputInfo exposes NameRole to QML, the filtering should
9090 * happen in the backend.
9191 */
92− property bool blacklistedDevicePresent: false
93− property var blacklistedDeviceList: ["py-evdev-uinput"]
92+ property bool forceOSKEnabled: false
93+ property var autopilotEmulatedDeviceNames: ["py-evdev-uinput"]
9494 UnitySortFilterProxyModel {
95− id: blacklistedDevices
95+ id: autopilotDevices
9696 model: keyboardsModel
97− onCountChanged: {
98− root.blacklistedDevicePresent = blacklistedDevicePresent();
97+ onDeviceAdded: {
98+ root.forceOSKEnabled = autopilotDevicePresent();
9999 }
100100
101− function blacklistedDevicePresent() {
101+ onDeviceRemoved: {
102+ root.forceOSKEnabled = autopilotDevicePresent();
103+ }
104+
105+ function autopilotdDevicePresent() {
102106 for(var i = 0; i < count; i++) {
103107 var device = get(i);
104− if (blacklistedDeviceList.indexOf(device.name) != -1) {
108+ if (autopilotEmulatedDeviceNames.indexOf(device.name) != -1) {
109+ console.warn("Forcing the OSK to be enabled as there is an autopilot eumlated device present.")
105110 return true;
106111 }
107112 }
@@ -221,7 +226,7 @@ Rectangle {
221226 // thus hiding it here if there is a physical one around or if we have a second
222227 // screen (the virtual touchpad & osk on the phone) attached.
223228 oskEnabled: (keyboardsModel.count === 0 && screens.count === 1) ||
224− blacklistedDevicePresent
229+ forceOSKEnabled
225230
226231 // TODO: Factor in the connected input devices (eg: physical keyboard, mouse, touchscreen),
227232 // what's the output device (eg: big TV, desktop monitor, phone display), etc.