From 4d71d9f46d7bcc9dd5dadf27fbba575f5d589a25 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 29 Jan 2024 15:44:38 +0100 Subject: [PATCH] keyboard: Support OSK layout modes explicitly We only support "latched" which stays toggled on for a single character unless long-pressed. Support "default" mode explicitly to switch back to the default level, leaving "locked" implicitly supported as the way to stay in the same level. Part-of: --- js/ui/keyboard.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 1dc369ff1..fe9db59c7 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1440,7 +1440,8 @@ export const Keyboard = GObject.registerClass({ if (key.action !== 'modifier') { button.connect('commit', (_actor, keyval, str) => { this._commitAction(keyval, str).then(() => { - if (layout.mode === 'latched' && !this._latched) + if (layout.mode === 'default' || + (layout.mode === 'latched' && !this._latched)) this._setActiveLevel('default'); }); });