diff --git a/PlayTools/Controls/ControlMode.swift b/PlayTools/Controls/ControlMode.swift index e4b4f5b8..f690406c 100644 --- a/PlayTools/Controls/ControlMode.swift +++ b/PlayTools/Controls/ControlMode.swift @@ -23,16 +23,17 @@ public class ControlMode { } func setMapping(_ mapped: Bool) { - keyboardMapped = mapped if mapped { PlayInput.shared.parseKeymap() } else { + show(true) PlayInput.shared.invalidate() } + keyboardMapped = mapped } func show(_ show: Bool) { - if !editor.editorMode { + if keyboardMapped { if show { if !visible { NotificationCenter.default.post(name: NSNotification.Name.playtoolsCursorWillShow, diff --git a/PlayTools/Controls/PlayInput.swift b/PlayTools/Controls/PlayInput.swift index e8a1ad4c..d9866252 100644 --- a/PlayTools/Controls/PlayInput.swift +++ b/PlayTools/Controls/PlayInput.swift @@ -65,7 +65,6 @@ class PlayInput { Toucher.writeLog(logMessage: "editor opened? \(show)") if show { self.invalidate() - mode.show(show) if let keyboard = GCKeyboard.coalesced!.keyboardInput { keyboard.keyChangedHandler = { _, _, keyCode, pressed in PlayKeyboard.handleEditorEvent(keyCode: keyCode, pressed: pressed)