GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TUI: Ctrl+M in /move dialog conflicts with Enter in terminals · Issue #33239 · anomalyco/opencode

TUI: Ctrl+M in /move dialog conflicts with Enter in terminals #33239

New issue
Copy link
New issue
Copy link
Closed
#33508
Closed
TUI: Ctrl+M in /move dialog conflicts with Enter in terminals#33239
#33508
Copy link
Assignees
simonklee

Description

@firefoxmmx2
firefoxmmx2
opened on Jun 21, 2026
Issue body actions

Description

In the /move dialog, the footer shows Ctrl+M as the shortcut to create a new working copy. However, Ctrl+M sends the same byte as Enter (\\r, ASCII 13) in any terminal emulator — kitty, Alacritty, GNOME Terminal, xterm, etc. The TUI cannot distinguish between them, so pressing Ctrl+M always triggers Enter instead of creating a new workspace.

Steps to Reproduce

  1. Run opencode in any terminal (Linux/macOS)
  2. Run /move command
  3. See footer hint showing Ctrl+M to create a new working copy
  4. Press Ctrl+M — it behaves as Enter (submits/closes the dialog) instead

Expected Behavior

Ctrl+M should create a new working copy as the footer suggests, or the shortcut should be changed to a key combination that does not conflict with Enter in terminals (e.g., Ctrl+N, Ctrl+O, or revert to the previous Ctrl+W).

Actual Behavior

Ctrl+M triggers Enter, making the shortcut unusable in terminal TUI. Mouse clicking the footer action works fine.

Environment

  • OpenCode version: 1.17.9
  • Terminal: kitty (also tested on Alacritty, GNOME Terminal)
  • OS: Linux

Additional Context

This was introduced in PR #30989 which changed the shortcut from Ctrl+W to Ctrl+M. The issue is terminal-specific — the Desktop and Web apps handle Ctrl+M correctly because they process modifier keys at the application level rather than relying on raw terminal byte sequences.

It is a known limitation that Ctrl+M / Ctrl+I / Ctrl+H / Ctrl+[ cannot be used as distinct shortcuts in terminal TUIs because they are identical to Enter, Tab, Backspace, and Escape respectively at the terminal protocol level.

Suggested Fix

  • Change the shortcut to a non-conflicting combination like Ctrl+N or Ctrl+O
  • Or make the move dialog keybinds configurable via tui.json
  • Or revert to the previous Ctrl+W

Activity

  1. github-actions
    assigned
    simonklee
    on Jun 21, 2026
  2. simonklee
    added a commit that references this issue on Jun 23, 2026

    fix(tui): make move session command bindable (#33508)

    This issue will close once commit 3cdd431 is merged into the 'dev' branch.
    3cdd431
  3. simonklee
    closed this as completedin #33508on Jun 23, 2026
  4. BenGu3
    added a commit that references this issue on Jun 27, 2026

    fix(tui): make move session command bindable (anomalyco#33508)

    This issue will close once commit 56649a4 is merged into the 'dev' branch.
    56649a4
  5. leilashellroot commented on Jul 4, 2026

    @leilashellroot
    leilashellroot
    on Jul 4, 2026
    More actions

    #33508 does not address this issue at all, closing this must be a mistake. OP is talking about the "new" action on the "Move session" component.
    @simonklee

  6. firefoxmmx2 commented on Jul 5, 2026

    @firefoxmmx2
    firefoxmmx2
    on Jul 5, 2026
    Author
    More actions

    #33508 does not address this issue at all, closing this must be a mistake. OP is talking about the "new" action on the "Move session" component. @simonklee

    It's working now. The keyboard shortcut Ctrl+M still doesn't work, but they now offer a custom shortcut: "dialog.move_session.new": "Ctrl+W".
    The settings performed.

  7. MarsQiu007
    added a commit that references this issue on Jul 31, 2026

    fix(tui): make move session command bindable (#33508)

    This issue will close once commit ead20fc is merged into the 'main' branch.
    ead20fc
  8. rldona
    added a commit that references this issue on Sep 24, 2026

    fix(tui): make move session command bindable (anomalyco#33508)

    This issue will close once commit ecfb0ba is merged into the 'main' branch.
    ecfb0ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @simonklee
    simonklee

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.