Skip to content

feat: visible caret and jump to start/end on the on-screen keyboard - #118

Merged
nextestudios merged 1 commit into
mainfrom
feature/43-keyboard-caret
Sep 27, 2026
Merged

nextestudios merged 1 commit into
mainfrom
feature/43-keyboard-caret

Conversation

@nextestudios

Copy link
Copy Markdown
Owner

Summary

Builds on the existing caret support in VirtualKeyboard.

  • Jump to start/end: VirtualKeyboard.MoveCaretToStart/End. While the keyboard is open, LT/RT (PageUp/PageDown) call them, and so do physical Home/End (and PgUp/PgDn). Text, page and Shift state are left alone.
  • Visible caret: the text field draws a steady bar (┃) in the accent color between two text runs, with no animation. It replaces the thin plain │ that was spliced into the text.
  • Narrator: the field's accessible name now includes the caret ("cursor no início / no fim / na posição X de Y"). A move that changes only the cursor (text unchanged) raises a UIA notification, so Narrator speaks it without chattering on every key.
  • Action bar: the keyboard context adds Início (LT) and Fim (RT) through the existing prompt mechanism (feat: add dynamic controller button prompts to action bar #34).
  • LB/RB and ◀ ▶ repeat when held (enhancement: hold-to-repeat for Backspace and cursor keys in the virtual keyboard #42); LT/RT are already repeatable navigation, and repeating them does nothing extra.

Tests

CI (Windows), one new unit test:

  • On a 209-character text, LT jumps to 0 and RT jumps to the end. Moving the cursor keeps Shift (Once) and the symbols page. Typing - with D-pad + South after Control gives Control-FS… with the caret after the insert. This covers both acceptance criteria.

Not verifiable in CI, so added to docs/TESTING.md:

Refs #43

🤖 Generated with Claude Code

@nextestudios
nextestudios force-pushed the feature/43-keyboard-caret branch 2 times, most recently from a5831db to e98fd73 Compare September 27, 2026 03:02
The caret is a steady accent-colored bar. LT/RT (or Home/End) move it
to the start or end without changing text, page or Shift. The field's
accessible name includes the caret position, and cursor-only moves are
raised as a Narrator notification.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nextestudios
nextestudios force-pushed the feature/43-keyboard-caret branch from e98fd73 to 868afda Compare September 27, 2026 03:04
@nextestudios
nextestudios merged commit aea8277 into main Sep 27, 2026
1 check passed
@nextestudios
nextestudios deleted the feature/43-keyboard-caret branch September 27, 2026 03:06
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.

enhancement: improve text cursor navigation (visible caret, jump to start/end)

1 participant