Skip to content

Add Ctrl+Home / Ctrl+End to jump to start/end of document #21

@Wavesonics

Description

@Wavesonics

Description

Home/End now move to the start/end of the current line (great!), but Ctrl+Home and Ctrl+End do nothing. In most desktop editors these jump to the very start / very end of the whole document.

Expected

  • Ctrl+Home → move cursor to the start of the document.
  • Ctrl+End → move cursor to the end of the document.
  • With Shift held, extend the selection to that point.

Notes / likely area

handleHome / handleEnd in src/commonMain/kotlin/com/darkrockstudios/texteditor/input/TextEditorKeyCommandHandler.kt:280-300 currently move to line start/end and ignore isCtrlPressed. Add the Ctrl branch to move to document start/end (mirroring how the arrow handlers branch on isCtrlPressed for word movement), and reuse updateSelectionForCursorMovement for the Shift variant.


Reported by a user of the Hammer editor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions