Skip to content

Add formatting keyboard shortcuts (Ctrl+B bold, Ctrl+I italic, etc.) #22

@Wavesonics

Description

@Wavesonics

Description

There are no keyboard shortcuts for the formatting actions on the markdown toolbar. Users want Ctrl+B for bold and Ctrl+I for italic without reaching for the mouse, and ideally shortcuts for the other markdown toolbar actions too.

Expected

  • Ctrl+B → toggle bold on the selection (or at the cursor for subsequent typing).
  • Ctrl+I → toggle italic.
  • Consider bindings for the remaining markdown toolbar actions (e.g. strikethrough, code, headings, lists).

Notes / likely area

Shortcuts are dispatched in TextEditorKeyCommandHandler.handleKeyEvent (src/commonMain/kotlin/com/darkrockstudios/texteditor/input/TextEditorKeyCommandHandler.kt:31). The toggle logic already exists for the toolbar (bold/italic span manipulation); these handlers would wire Ctrl+B/Ctrl+I (etc.) to the same code path. Note handleCharacterInput already swallows Ctrl/Meta chord chars (:142), so adding explicit branches won't insert literal characters.


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