@@ -183,7 +183,7 @@ Item {
184 // We need to manually update this on startup as the binding
184 // We need to manually update this on startup as the binding
185 // below doesn't seem to have any effect at that stage
185 // below doesn't seem to have any effect at that stage
186− oskSettings.disableHeight = !shell.oskEnabled || shell.usageScenario == "desktop"
186+ oskSettings.disableHeight = !shell.oskEnabled
189 // we must rotate to a supported orientation regardless of shell's preference
189 // we must rotate to a supported orientation regardless of shell's preference
@@ -194,7 +194,13 @@ Item {
194 Binding {
194 Binding {
195 target: oskSettings
195 target: oskSettings
196 property: "disableHeight"
196 property: "disableHeight"
197− value: !shell.oskEnabled || shell.usageScenario == "desktop"
197+ value: !shell.oskEnabled
201+ target: unity8Settings
202+ property: "oskSwitchVisible"
203+ value: shell.hasKeyboard
200 readonly property int supportedOrientations: shell.supportedOrientations
206 readonly property int supportedOrientations: shell.supportedOrientations
@@ -268,12 +274,8 @@ Item {
268 mode: applicationArguments.mode
274 mode: applicationArguments.mode
269 hasMouse: pointerInputDevices > 0
275 hasMouse: pointerInputDevices > 0
270 hasKeyboard: keyboardsModel.count > 0
276 hasKeyboard: keyboardsModel.count > 0
271− // TODO: Factor in if the current screen is a touch screen and if the user wants to
277+
272− // have multiple keyboards around. For now we only enable one keyboard at a time
278+ oskEnabled: unity8Settings.alwaysShowOsk || !hasKeyboard || forceOSKEnabled
273− // thus hiding it here if there is a physical one around or if we have a second
274− // screen (the virtual touchpad & osk on the phone) attached.
275− oskEnabled: (keyboardsModel.count === 0 && screens.count === 1) ||
278 usageScenario: {
280 usageScenario: {
279 if (unity8Settings.usageMode === "Windowed") {
281 if (unity8Settings.usageMode === "Windowed") {