From 238a0003696604cddacc6a7474eb8b95fda8207d Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Wed, 31 Aug 2022 13:49:54 -0400 Subject: [PATCH] SymbolShiftKey: Preserve previous shift state when leaving symbols mode --- qml/keys/SymbolShiftKey.qml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/qml/keys/SymbolShiftKey.qml b/qml/keys/SymbolShiftKey.qml index a737b082..105ff29a 100644 --- a/qml/keys/SymbolShiftKey.qml +++ b/qml/keys/SymbolShiftKey.qml @@ -25,12 +25,19 @@ ActionKey { overridePressArea: true; + // Internal proerty for preserving previous active keypad state + property string __oldKeypadState: panel.activeKeypadState + onPressed: { Feedback.keyPressed(); - if (panel.state == "CHARACTERS") + if (panel.state == "CHARACTERS") { + __oldKeypadState = panel.activeKeypadState; + panel.activeKeypadState = "NORMAL"; panel.state = "SYMBOLS"; - else + } else { + panel.activeKeypadState = __oldKeypadState; panel.state = "CHARACTERS"; + } } }