Space swipe to toggle numpad layout, with side bonuses (#950)

* make the numpad key toggle-based, allowing for use in its own layout. it also remembers the symbols-shift state.
* add space swipe gesture to toggle the numpad
* fix sliding key input for the numpad key bugs
This commit is contained in:
Devy Ballard 2024-07-09 14:26:23 -06:00 committed by GitHub
parent 309d7f299e
commit 105d044aa8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 129 additions and 38 deletions

View file

@ -381,6 +381,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
return switch (prefs.getString(PREF_SPACE_HORIZONTAL_SWIPE, "none")) {
case "move_cursor" -> KeyboardActionListener.SWIPE_MOVE_CURSOR;
case "switch_language" -> KeyboardActionListener.SWIPE_SWITCH_LANGUAGE;
case "toggle_numpad" -> KeyboardActionListener.SWIPE_TOGGLE_NUMPAD;
default -> KeyboardActionListener.SWIPE_NO_ACTION;
};
}
@ -389,6 +390,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
return switch (prefs.getString(PREF_SPACE_VERTICAL_SWIPE, "none")) {
case "move_cursor" -> KeyboardActionListener.SWIPE_MOVE_CURSOR;
case "switch_language" -> KeyboardActionListener.SWIPE_SWITCH_LANGUAGE;
case "toggle_numpad" -> KeyboardActionListener.SWIPE_TOGGLE_NUMPAD;
default -> KeyboardActionListener.SWIPE_NO_ACTION;
};
}