abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/KeyValue.java
diff options
context:
space:
mode:
authorJules Aguillon2022-04-03 17:15:12 +0200
committerJules Aguillon2022-04-03 17:15:12 +0200
commitaa78229b2aef963d5f840b72d8aa3cad3a78dfc4 (patch)
tree4ea7950b7a62829890ba0e9dc1b8108b39dcc902 /srcs/juloo.keyboard2/KeyValue.java
parentd62e7647e0feb9c3c7d363c50f31f1aaf101ecd0 (diff)
downloadunexpected-keyboard-aa78229b2aef963d5f840b72d8aa3cad3a78dfc4.tar.gz
unexpected-keyboard-aa78229b2aef963d5f840b72d8aa3cad3a78dfc4.zip
Add the Programming Layout option
Allow specifying a layout for programming and add a key for switching to it easily. The switching key is placed on the top edge of the space bar. The option has no effect by default because the ergonomic isn't ideal, it needs to be enabled explicitly. Users of Latin-script languages certainly prefer to use one layout (for programming or not). This feature might be removed in favor of a better language-switching mechanisms in the future.
Diffstat (limited to 'srcs/juloo.keyboard2/KeyValue.java')
-rw-r--r--srcs/juloo.keyboard2/KeyValue.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java
index 9d747cb..3c7c305 100644
--- a/srcs/juloo.keyboard2/KeyValue.java
+++ b/srcs/juloo.keyboard2/KeyValue.java
@@ -14,6 +14,7 @@ class KeyValue
public static final int EVENT_SWITCH_BACK_EMOJI = -6;
public static final int EVENT_CHANGE_METHOD = -7;
public static final int EVENT_ACTION = -8;
+ public static final int EVENT_SWITCH_PROGRAMMING = -9;
public static final char CHAR_NONE = '\0';
// Behavior flags
@@ -234,10 +235,11 @@ class KeyValue
addCharKey('£', EVENT_NONE, FLAG_LOCALIZED);
addSpecialKey("config", "\u0004", EVENT_CONFIG, FLAG_KEY_FONT | FLAG_SMALLER_FONT);
- addSpecialKey("switch_text", "ABC", EVENT_SWITCH_TEXT | FLAG_SMALLER_FONT);
- addSpecialKey("switch_numeric", "123+", EVENT_SWITCH_NUMERIC | FLAG_SMALLER_FONT);
+ addSpecialKey("switch_text", "ABC", EVENT_SWITCH_TEXT, FLAG_SMALLER_FONT);
+ addSpecialKey("switch_numeric", "123+", EVENT_SWITCH_NUMERIC, FLAG_SMALLER_FONT);
addSpecialKey("switch_emoji", "\u0001" , EVENT_SWITCH_EMOJI, FLAG_KEY_FONT | FLAG_SMALLER_FONT);
addSpecialKey("switch_back_emoji", "ABC", EVENT_SWITCH_BACK_EMOJI);
+ addSpecialKey("switch_programming", "Prog", EVENT_SWITCH_PROGRAMMING, FLAG_SMALLER_FONT);
addSpecialKey("change_method", "\u0009", EVENT_CHANGE_METHOD, FLAG_KEY_FONT | FLAG_SMALLER_FONT);
addSpecialKey("action", "Action", EVENT_ACTION, FLAG_SMALLER_FONT); // Will always be replaced