abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/KeyEventHandler.java
diff options
context:
space:
mode:
authorJules Aguillon2022-11-13 00:24:23 +0100
committerJules Aguillon2022-11-13 00:24:23 +0100
commit51b330c6168a8b0e0c16482254d4674fbe5476c7 (patch)
treebc3b05120d606e386269322e7fab2694e20ee845 /srcs/juloo.keyboard2/KeyEventHandler.java
parent815e30a505eb6766e29d85c2e1a5d8f4da9c83d3 (diff)
downloadunexpected-keyboard-51b330c6168a8b0e0c16482254d4674fbe5476c7.tar.gz
unexpected-keyboard-51b330c6168a8b0e0c16482254d4674fbe5476c7.zip
Allow switching quickly between two layouts
A new option allow to choose a secondary layout, the switching key is placed on the top edge of the space bar. The "Programming layout" option was basically doing that but it was possible to choose from a few layouts only. It is improved and renamed. The 'LayoutListPreference' allows setting the string for the first entry but otherwise share the rest of the array. Add nice icons from materialdesignicons.
Diffstat (limited to 'srcs/juloo.keyboard2/KeyEventHandler.java')
-rw-r--r--srcs/juloo.keyboard2/KeyEventHandler.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/srcs/juloo.keyboard2/KeyEventHandler.java b/srcs/juloo.keyboard2/KeyEventHandler.java
index 4623dec..5d23903 100644
--- a/srcs/juloo.keyboard2/KeyEventHandler.java
+++ b/srcs/juloo.keyboard2/KeyEventHandler.java
@@ -27,13 +27,14 @@ class KeyEventHandler implements Config.IKeyEventHandler
switch (key.getEvent())
{
case CONFIG: _recv.showKeyboardConfig(); break;
- case SWITCH_TEXT: _recv.switchMain(); break;
+ case SWITCH_TEXT:
+ case SWITCH_SECOND_BACK: _recv.switchMain(); break;
case SWITCH_NUMERIC: _recv.switchNumeric(); break;
case SWITCH_EMOJI: _recv.setPane_emoji(); break;
case SWITCH_BACK_EMOJI: _recv.setPane_normal(); break;
case CHANGE_METHOD: _recv.switchToNextInputMethod(); break;
case ACTION: _recv.performAction(); break;
- case SWITCH_PROGRAMMING: _recv.switchProgramming(); break;
+ case SWITCH_SECOND: _recv.switchSecond(); break;
case SWITCH_GREEKMATH: _recv.switchGreekmath(); break;
case CAPS_LOCK: _recv.enableCapsLock(); break;
}
@@ -107,7 +108,7 @@ class KeyEventHandler implements Config.IKeyEventHandler
public void switchMain();
public void switchNumeric();
- public void switchProgramming();
+ public void switchSecond();
public void switchGreekmath();
public void sendKeyEvent(int eventAction, int eventCode, int meta);