Skip to content

Commit

Permalink
Merge pull request maliit#162 from dobey/prev-shift-state
Browse files Browse the repository at this point in the history
SymbolShiftKey: Preserve previous shift state when leaving symbols mode
  • Loading branch information
dobey authored Oct 13, 2022
2 parents 555bd37 + 238a000 commit a833db4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions qml/keys/SymbolShiftKey.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}
}

0 comments on commit a833db4

Please sign in to comment.