feat: implement auto-spacing after punctuation and double-tap space period (#669) - #670
feat: implement auto-spacing after punctuation and double-tap space period (#669)#670prince-0408 wants to merge 12 commits into
Conversation
…eriod (scribe-org#669) - Add auto-space after punctuation (. , ! ?) setting and key handling - Refine double-tap space for period conversion and auto-capitalization - Default auto-spacing and double-tap period preferences to enabled - Add unit tests for SpaceKeyProcessor
|
Thanks for the PR, @prince-0408! Could we do one quick PR to Scribe-i18n to add in the needed strings for this menu option? Then we can merge that and rebase this PR? |
Hi @andrewtavis! 👋 I have opened the PR to CI Status & Fallback Implementation:
Once |
|
Thanks, @prince-0408! See my comment here asking if we want to expand this a bit :) I'm happy to finalize the changes to Scribe-i18n if you verify that it makes sense, and from there we can bring those strings in and finish this up too 😊 |
|
Scribe-i18n has been updated now, @prince-0408, so feel free to sync this and I'll look further 😊 |
Hi @andrewtavis I have synced the I also cleaned up the temporary fallback entries from All checks are running and ready for your review whenever you have a moment. Thanks! 😊 |
Description
This PR implements two standard soft-keyboard usability features as requested in #669 by adding automatic punctuation spacing and refining double-tap space for period behavior to align with modern keyboard standards (such as Gboard and SwiftKey).
Key Changes
Double-Tap Space for Period (
.):SpaceKeyProcessor.ktso that pressing the spacebar twice after a word converts the trailing space to a period and space (.).SHIFT_ON_ONE_CHAR) on period conversion to capitalize the first letter of the next sentence.Auto-Spacing After Punctuation:
KeyHandler.ktto intercept punctuation keys (.,,,!,?) and automatically append a trailing space when typed after a word....or?!) or backspace is typed.Settings & Preferences Integration:
AUTO_SPACE_AFTER_PUNCTUATIONconstant, getter, and setter inPreferencesHelper.kt.true).LanguageSettingsScreen.kt.en-US/string.xml.Unit Tests & Linter Cleanliness:
SpaceKeyProcessorTest.ktfor spacebar event processing and period commits../gradlew formatKotlinto ensure clean compliance withktlintanddetekt.Visual Demonstration
Related Issue
Closes #669