Skip to content

macOS: text editing shortcuts use Ctrl instead of Cmd in all editor fields #796

Description

@Wavesonics

On macOS, Cmd+C / Cmd+V / Cmd+A / Cmd+X / Cmd+Z do nothing in any of our text editing fields. Users have to select text and use the right-click context menu. Ctrl+C, which does nothing in any other Mac app, is what actually works.

Reported by a new user trying the Story Ideas screen:

is it intentional that on macOS blocks like the main typing field on the story ideas feature don't actually work with ctrl+c, ctrl+v, ctrl+a etc instead needing to highlight, right click, etc and manually do things that way?

oh, nvm. I'm going to guess "no" or I missed a setting because I misclicked "ctrl" on macOS and it worked just fine. so it's using ctrl instead of cmd on mac.

Scope

Not specific to Story Ideas. Every MarkdownEditField / TextEditor surface is affected, which is all of them:

  • Scene editor (SceneEditorUi.kt) and focus mode (FocusModeUi.kt)
  • Story Ideas (StoryIdeasUi.kt:1200)
  • Notes (CreateNoteUi.kt, ViewNoteUi.kt)
  • Encyclopedia (CreateEntryUi.kt, ViewEntryUi.kt)
  • Timeline (CreateTimeLineEventUi.kt, ViewTimeLineEventUi.kt)
  • Draft compare (DraftCompareUi.kt)

Our own app-level shortcuts are fine: composeUi/.../compose/ShortcutModifiers.kt:13 already does isCtrlPressed || isMetaPressed, so Cmd+F, Cmd+S, Cmd+B, Cmd+I work as expected. That makes the failure more confusing, not less, since the app answers Cmd for its own shortcuts and ignores it for the ones the OS owns.

Root cause is upstream

The bug is in the ComposeTextEditor library, not in this repo. TextEditorKeyCommandHandler.handleKeyEvent gates every shortcut on isCtrlPressed with no isMetaPressed path.

Tracked at Darkrock-Studios/ComposeTextEditor#40, which also covers the macOS navigation bindings (Option+Arrow for word movement, Cmd+Arrow for line/document bounds) that a plain modifier swap would get wrong.

Work on this side

  • Bump the ComposeTextEditor dependency once the fix is released.
  • Verify on a real Mac across the editor surfaces listed above, not just Story Ideas.
  • Reply to the reporter.

Worth prioritising: this is a first-run experience problem, and clipboard keys not working reads as "this app is broken" rather than "this app has a quirk".

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions