diff options
| author | Jules Aguillon | 2025-12-18 19:15:32 +0100 |
|---|---|---|
| committer | GitHub | 2025-12-18 19:15:32 +0100 |
| commit | 41777fdda61715a59be241f0be9a8e3385222888 (patch) | |
| tree | bcddb5a4a29af2caf37e1f565efcfbffdd6814be /srcs/juloo.keyboard2/Config.java | |
| parent | be0aa07a2a728509b6244e00247bfe2fff5c66e0 (diff) | |
| download | unexpected-keyboard-41777fdda61715a59be241f0be9a8e3385222888.tar.gz unexpected-keyboard-41777fdda61715a59be241f0be9a8e3385222888.zip | |
Disable selection mode in text editors (#1141)
* Disable selection mode in text editors
Selection mode removes the space bar key (which is replaced by the Esc
key) and can be annoying in Emacs for example.
Text editor users probably have the `esc` key available.
* Refactor: Move EditorInfo related code to EditorConfig
Add the new EditorConfig class that handles configuration extracted from
the EditorInfo. It is accessible from the Config class for convenience.
This aims at reducing the length of already large classes and group the
code that was spread over several classes.
Diffstat (limited to 'srcs/juloo.keyboard2/Config.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Config.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index 5dbf030..577ace5 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -73,10 +73,9 @@ public final class Config public int clipboard_history_duration; // Dynamically set + /** Configuration options implied by the connected editor. */ + public EditorConfig editor_config; public boolean shouldOfferVoiceTyping; - public String actionLabel; // Might be 'null' - public int actionId; // Meaningful only when 'actionLabel' isn't 'null' - public boolean swapEnterActionKey; // Swap the "enter" and "action" keys public ExtraKeys extra_keys_subtype; public Map<KeyValue, KeyboardData.PreferredPos> extra_keys_param; public Map<KeyValue, KeyboardData.PreferredPos> extra_keys_custom; @@ -93,6 +92,7 @@ public final class Config private Config(SharedPreferences prefs, Resources res, IKeyEventHandler h, Boolean foldableUnfolded) { _prefs = prefs; + editor_config = new EditorConfig(); // static values marginTop = res.getDimension(R.dimen.margin_top); keyPadding = res.getDimension(R.dimen.key_padding); @@ -102,9 +102,6 @@ public final class Config refresh(res, foldableUnfolded); // initialized later shouldOfferVoiceTyping = false; - actionLabel = null; - actionId = 0; - swapEnterActionKey = false; extra_keys_subtype = null; handler = h; } |
