Skip to content

Handle spacing and capitals for scanned punctuation - #873

Merged
enaboapps merged 7 commits into
mainfrom
codex/872-smart-keyboard-punctuation
Sep 24, 2026
Merged

enaboapps merged 7 commits into
mainfrom
codex/872-smart-keyboard-punctuation

Conversation

@enaboapps

@enaboapps enaboapps commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #872.

Change

  • The scanned keyboard treats . , ! ? : ; as prose punctuation. It removes a preceding space only when the keyboard's own insertion is still verified, then inserts one space after the mark. The Numbers-page period remains literal for decimals.
  • A sentence-ending mark activates the keyboard’s visible one-use Shift state for the next letter without changing manual Caps lock. Tapping that automatic Shift turns it off. Sentence-start predictions retain title case, and accepted suggestions satisfy pending capitalization; their trailing spaces can be removed before punctuation.
  • A content-free input activity epoch and foreground identity invalidate ownership on external input. Switch assignment changes update the ignored-key set. Editing and navigation clear pending capitalization; shortcut output remains unchanged. Native observation retries after hook failure, and a disabled macOS tap stops before replacement. Persisted schemas are unchanged.

Validation

  • npm run lint — pass
  • npm test — pass (223 UI tests, 5 update-feed tests)
  • npm run build — pass
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check — pass
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings — pass
  • cargo test --manifest-path src-tauri/Cargo.toml — pass (538 Rust unit tests, 7 integration tests; 1 ignored)
  • Windows 11 Parallels VM: built head ce32bdf with Node 24.19.0 and the ARM64 Windows Tauri debug target. With Notepad foreground, assigned switch-key events sent through Windows SendKeys opened the scanned keyboard and selected Space, period, a, comma, Space, b, the Numbers page, 1, decimal point, and 6. The resulting text matched . A, b1.6: the owned space was removed before the period, one was inserted after punctuation, the next letter was capitalized, the extra Space was suppressed, and the Numbers-page period stayed literal. The keyboard overlay remained visible without taking focus. Original VM switch and scanning settings were restored after the test.
  • Follow-up Windows 11 VM run: built head a3aefcd and used assigned switch-key events in Notepad to enter a space, period, and letter. The overlay showed active “Shift / Next key” with uppercase letters after the period, then Shift inactive after the letter; resulting text matched . A. Both VM settings files were restored byte for byte after testing, and Switchify was restarted with those originals.
  • Windows scope: this was an ARM64 native debug build in the Windows 11 VM using scripted switch-key events; it was not a physical switch device or installer validation. macOS event-tap recovery is covered by the Rust lifecycle test, not a live macOS permission-toggle test.
  • Independent review of latest head a3aefcd: no remaining actionable findings.

@enaboapps enaboapps added this to the v1.0.0-rc.16 milestone Sep 24, 2026
@enaboapps
enaboapps marked this pull request as ready for review September 24, 2026 14:20
@enaboapps
enaboapps marked this pull request as draft September 24, 2026 14:30
@enaboapps
enaboapps marked this pull request as ready for review September 24, 2026 15:05
@enaboapps
enaboapps merged commit 7977040 into main Sep 24, 2026
6 checks passed
@enaboapps
enaboapps deleted the codex/872-smart-keyboard-punctuation branch September 24, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle spacing and capitalization for scanned keyboard punctuation

1 participant