Skip to content

feat: hold to repeat backspace and cursor keys on the on-screen keyboard - #112

Merged
nextestudios merged 1 commit into
mainfrom
feature/42-keyboard-repeat
Sep 27, 2026
Merged

nextestudios merged 1 commit into
mainfrom
feature/42-keyboard-repeat

Conversation

@nextestudios

Copy link
Copy Markdown
Owner

Summary

Holding an editing button on the on-screen keyboard now repeats, reusing the router's existing InputSettings delay, interval and acceleration.

  • InputRouter.RepeatPolicy: optional context rule, checked on every repeat (so a repeat stops as soon as the rule stops applying). Without a policy, only navigation repeats, as before.
  • AppController.IsRepeatableInContext: navigation everywhere, plus VirtualKeyboard.IsRepeatable while a keyboard modal is open and not busy.
  • VirtualKeyboard.IsRepeatable: West (backspace) and LB/RB (cursor) repeat. South repeats only when held on the ⌫ ◀ ▶ key it pressed; moving focus or any other action stops it. Done, Cancel and character keys never repeat.
  • InputHost wires the policy into the router and uses it for OS key repeat too, so holding ←/→ moves the caret continuously while typing. Enter (Done) still never repeats.
  • IsRepeatable() itself is unchanged, so Back/Confirm stay non-repeatable everywhere else.

Tests

CI (Windows):

  • New: holding West for 2 s through the real InputRouter deletes many characters and stops on release. Holding South on ⌫ repeats, and holding it on a character types once.
  • The existing router tests (Confirm_fires_once_per_press_and_never_repeats, etc.) are unchanged.

Manual (in docs/TESTING.md): the hold behavior with a real controller.

Closes #42

🤖 Generated with Claude Code

@nextestudios
nextestudios force-pushed the feature/42-keyboard-repeat branch 5 times, most recently from 6d7f331 to cf5ca64 Compare September 27, 2026 02:52
InputRouter takes a context repeat policy. While the keyboard is open,
West (backspace), LB/RB (cursor) and South held on the focused backspace
or cursor key repeat with the existing InputSettings timings; Done,
Cancel and character keys never repeat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nextestudios
nextestudios force-pushed the feature/42-keyboard-repeat branch from cf5ca64 to d1ceb2e Compare September 27, 2026 02:54
@nextestudios
nextestudios merged commit 2e130a4 into main Sep 27, 2026
1 check passed
@nextestudios
nextestudios deleted the feature/42-keyboard-repeat branch September 27, 2026 02:56
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: hold-to-repeat for Backspace and cursor keys in the virtual keyboard

1 participant