feat: word-based text navigation and deletion

Resolved 💬 2 comments Opened Apr 26, 2025 by vshuraeff Closed Aug 7, 2025

Feature Request: Implement Word-Based Text Navigation and Deletion

Description:
Introduce standard keyboard shortcuts using modifier keys (Alt/Option, potentially Cmd depending on platform standards) for word-level operations within text input fields. This includes moving the cursor word by word and deleting entire words at a time.

Motivation:
Currently, navigating and editing text often requires character-by-character actions, which is inefficient for larger edits. Implementing word-based shortcuts aligns with standard OS-level text editing behaviour, significantly improving editing speed and user experience.

Acceptance Criteria:

  1. Cursor Movement:
  • Pressing Alt/Option + Right Arrow moves the cursor to the beginning of the next word.
  • Pressing Alt/Option + Left Arrow moves the cursor to the beginning of the current or previous word.
  1. Word Deletion:
  • Pressing Alt/Option + Backspace deletes the word immediately preceding the cursor (and any preceding whitespace).
  • Pressing Alt/Option + Delete (or Fn+Alt/Option+Backspace on some keyboards) deletes the word immediately following the cursor (and any following whitespace).
  1. Selection (Optional but Recommended):
  • Combining Shift with the Alt/Option + Arrow Key combinations selects text word by word.

Usage Examples:

  1. Correcting a typo:
  • User typed: "Hello brave neww world"
  • Cursor is at the end.
  • Press Alt/Option + Left Arrow once -> cursor moves before "world".
  • Press Alt/Option + Left Arrow once more -> cursor moves before "neww".
  • Press Backspace once -> deletes the extra 'w'.
  1. Deleting a word:
  • User typed: "This is some sample text"
  • Cursor is after "sample ".
  • Press Alt/Option + Backspace once -> deletes "sample " -> "This is text".
  1. Replacing a word:
  • User typed: "Use the blue button"
  • Wants to replace "blue" with "green".
  • Place cursor before "blue".
  • Hold Shift + Alt/Option, press Right Arrow once -> selects "blue ".
  • Type "green " -> replaces selection -> "Use the green button".

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗