abouttreesummaryrefslogcommitdiff
path: root/res
diff options
context:
space:
mode:
authorJules Aguillon2026-02-19 00:37:42 +0100
committerGitHub2026-02-19 00:37:42 +0100
commitdf3594bd53c71d06f6e103f6782bb26b970beac4 (patch)
treec998211c06617baadd821a1a9bee03a66f1b51ee /res
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 'res')
-rw-r--r--res/values/strings.xml2
-rw-r--r--res/xml/settings.xml1
2 files changed, 3 insertions, 0 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d46b828..7cc8d1d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -36,6 +36,8 @@
<string name="pref_category_suggestions">Suggestions</string>
<string name="pref_suggestions_title">Suggestions</string>
<string name="pref_suggestions_summary">Enable word completion and spell checking</string>
+ <string name="pref_space_bar_auto_complete_title">Autocomplete with the space bar</string>
+ <string name="pref_space_bar_auto_complete_summary">Enter the best suggestion by pressing space</string>
<string name="pref_category_typing">Typing</string>
<string name="pref_swipe_dist_title">Swiping distance</string>
<string name="pref_swipe_dist_summary">Distance of characters in the corners of the keys (%s)</string>
diff --git a/res/xml/settings.xml b/res/xml/settings.xml
index a63c9d8..d846dd1 100644
--- a/res/xml/settings.xml
+++ b/res/xml/settings.xml
@@ -14,6 +14,7 @@
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_category_suggestions">
<CheckBoxPreference android:key="suggestions" android:title="@string/pref_suggestions_title" android:summary="@string/pref_suggestions_summary" android:defaultValue="true"/>
+ <CheckBoxPreference android:key="space_bar_auto_complete" android:title="@string/pref_space_bar_auto_complete_title" android:summary="@string/pref_space_bar_auto_complete_summary" android:defaultValue="false"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_category_typing">
<ListPreference android:key="swipe_dist" android:title="@string/pref_swipe_dist_title" android:summary="@string/pref_swipe_dist_summary" android:defaultValue="15" android:entries="@array/pref_swipe_dist_entries" android:entryValues="@array/pref_swipe_dist_values"/>