abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/KeyEventHandler.java
diff options
context:
space:
mode:
authorJules Aguillon2023-01-15 23:19:09 +0100
committerJules Aguillon2023-01-15 23:19:09 +0100
commit612657811179eefbb425698fb9a29311a9ee9945 (patch)
tree84f1fb125e01e132f65d89572108b8e7ce852535 /srcs/juloo.keyboard2/KeyEventHandler.java
parent046416389af577844665ddca30adad3798a74e29 (diff)
downloadunexpected-keyboard-612657811179eefbb425698fb9a29311a9ee9945.tar.gz
unexpected-keyboard-612657811179eefbb425698fb9a29311a9ee9945.zip
Avoid switching back from secondary layout automatically
Stay on the secondary layout after a config refresh or onStartInputView. The information is kept until the keyboard is restarted. Additionally, move tweaking the secondary layout to the Config class now that physical equality is not needed.
Diffstat (limited to 'srcs/juloo.keyboard2/KeyEventHandler.java')
-rw-r--r--srcs/juloo.keyboard2/KeyEventHandler.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/KeyEventHandler.java b/srcs/juloo.keyboard2/KeyEventHandler.java
index d6afb46..3031972 100644
--- a/srcs/juloo.keyboard2/KeyEventHandler.java
+++ b/srcs/juloo.keyboard2/KeyEventHandler.java
@@ -44,8 +44,7 @@ class KeyEventHandler implements Config.IKeyEventHandler
switch (key.getEvent())
{
case CONFIG: _recv.showKeyboardConfig(); break;
- case SWITCH_TEXT:
- case SWITCH_SECOND_BACK: _recv.switch_text(); break;
+ case SWITCH_TEXT: _recv.switch_text(); break;
case SWITCH_NUMERIC: _recv.switch_layout(R.xml.numeric); break;
case SWITCH_EMOJI: _recv.setPane_emoji(); break;
case SWITCH_BACK_EMOJI: _recv.setPane_normal(); break;
@@ -56,6 +55,7 @@ class KeyEventHandler implements Config.IKeyEventHandler
conn.performEditorAction(actionId);
break;
case SWITCH_SECOND: _recv.switch_second(); break;
+ case SWITCH_SECOND_BACK: _recv.switch_primary(); break;
case SWITCH_GREEKMATH: _recv.switch_layout(R.xml.greekmath); break;
case CAPS_LOCK: _recv.set_shift_state(true, true); break;
}
@@ -176,6 +176,7 @@ class KeyEventHandler implements Config.IKeyEventHandler
public void showKeyboardConfig();
public void switch_text();
+ public void switch_primary();
public void switch_second();
public void switch_layout(int layout_id);