Skip to content

fix(textarea): add ctrl+left/right for word movement#909

Open
dschmidt wants to merge 1 commit intocharmbracelet:mainfrom
dschmidt:fix/textarea-word-movement-keybindings
Open

fix(textarea): add ctrl+left/right for word movement#909
dschmidt wants to merge 1 commit intocharmbracelet:mainfrom
dschmidt:fix/textarea-word-movement-keybindings

Conversation

@dschmidt
Copy link
Copy Markdown

@dschmidt dschmidt commented Mar 18, 2026

Summary

  • Add ctrl+left and ctrl+right to textarea's default WordBackward and WordForward key bindings
  • textinput already binds these keys for word movement, but textarea only has alt+left/alt+right — this fixes the inconsistency

Test plan

  • Existing textarea tests pass
  • Verify ctrl+left/ctrl+right moves cursor by word in a textarea
  • Verify alt+left/alt+right still works as before

The textinput component binds ctrl+left and ctrl+right for word
backward/forward movement, but textarea only binds alt+left/right.
This inconsistency means ctrl+arrow word jumping works in single-line
inputs but not in textareas.

Add ctrl+left and ctrl+right to the textarea's default WordBackward
and WordForward key bindings to match textinput's behavior.
@dschmidt dschmidt requested a review from aymanbagabas as a code owner March 18, 2026 16:46
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.

1 participant