abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Config.java
diff options
context:
space:
mode:
authorJules Aguillon2026-02-19 00:37:42 +0100
committerGitHub2026-02-19 00:37:42 +0100
commitdf3594bd53c71d06f6e103f6782bb26b970beac4 (patch)
treec998211c06617baadd821a1a9bee03a66f1b51ee /srcs/juloo.keyboard2/Config.java
parentebf80415d8034d853bd79ba7cfb578db67862529 (diff)
downloadunexpected-keyboard-df3594bd53c71d06f6e103f6782bb26b970beac4.tar.gz
unexpected-keyboard-df3594bd53c71d06f6e103f6782bb26b970beac4.zip
Autocomplete on space bar and undo on delete (#1179)
* Refactor: Implement the space key as an editing action The space key is no longer a CHAR key but now an EDITING key. This allows changing the behavior of the space bar while allowing custom layout users to define a key outputing a space as before. KeyModifier and ComposeKey are updated to treat the space key as before. * Enter the best suggestion when the space bar is pressed * Refactor: Implement backspace as an editing action * Undo suggestion when delete is pressed The delete key (backspace internally) undoes the suggestion if the last action done was entering the suggestion with either the space bar or the candidates view. * Add an option to enable space bar autocomplete This option is off by default. Undoing a completion with backspace works in any case. * Refactor: Track selection emptyness in CurrentlyTypedWord This removes an expensive RPC call.
Diffstat (limited to 'srcs/juloo.keyboard2/Config.java')
-rw-r--r--srcs/juloo.keyboard2/Config.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java
index 2831254..98bb72b 100644
--- a/srcs/juloo.keyboard2/Config.java
+++ b/srcs/juloo.keyboard2/Config.java
@@ -74,6 +74,7 @@ public final class Config
public int circle_sensitivity;
public boolean clipboard_history_enabled;
public int clipboard_history_duration;
+ public boolean space_bar_auto_complete;
// Dynamically set
/** Configuration options implied by the connected editor. */
@@ -191,6 +192,7 @@ public final class Config
circle_sensitivity = Integer.valueOf(_prefs.getString("circle_sensitivity", "2"));
clipboard_history_enabled = _prefs.getBoolean("clipboard_history_enabled", false);
clipboard_history_duration = Integer.parseInt(_prefs.getString("clipboard_history_duration", "5"));
+ space_bar_auto_complete = _prefs.getBoolean("space_bar_auto_complete", false);
float screen_width_dp = dm.widthPixels / dm.density;
wide_screen = screen_width_dp >= WIDE_DEVICE_THRESHOLD;