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 — Command backspace not working from 1.0 · Issue #3783 · anomalyco/opencode

Command backspace not working from 1.0 #3783

New issue
Copy link
New issue
Copy link
Closed
Closed
Command backspace not working from 1.0#3783
Copy link
Assignees
kommander
Labels
bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Description

@knotbin
knotbin
opened on Nov 3, 2025
Issue body actions

Description

command backspace doesn't work to delete a line anymore

OpenCode version

1.0.12

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS 26.0.1

Terminal

Ghostty

Reacted by David Guevara, charlie, Przemyslaw Sokol, Dan Brown and Verner Codoceo

Activity

  1. knotbin
    added
    bugSomething isn't working
    on Nov 3, 2025
  2. github-actions
    added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 3, 2025
  3. github-actions commented on Nov 3, 2025

    @github-actions
    github-actionsBot
    on Nov 3, 2025 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • TUI crashes during prompt edit #3749: Similar Command+backspace issue on macOS 26.0.1 with Ghostty - user also reports that Command+backspace used to delete a line but nothing happened after updating to 1.0
    • opentui: bug: Selecting a model by pressing enter also send message in chat #3774: Key events not being consumed properly in opentui - broader keyboard input handling issues in the new TUI

    Feel free to ignore if none of these address your specific case.

  4. PranshuRaj1 commented on Nov 3, 2025

    @PranshuRaj1
    PranshuRaj1
    on Nov 3, 2025
    Contributor
    More actions

    Hello! I've been investigating this issue (#3783) and I think I've narrowed down the root cause.

    The original reporter is on macOS, but I can confirm this is a wider problem, as I'm on Windows and can reproduce a similar bug, Ctrl+Backspace only deletes one character (it's ignoring the Ctrl key).
    This suggests the new input component isn't handling modifier keys correctly.

    I looked into the opencode TUI code to see if I could find the onKeyDown logic, starting in packages/opencode/src/cli/cmd/tui/ as per the CONTRIBUTING.md.
    I found the Prompt component, which renders the <textarea>. In its onKeyDown handler, I noticed it only intercepts specific, custom keybinds:

    <textarea
      // ...
      onKeyDown={async (e: KeyEvent) => {
        // ...
        // It correctly matches custom keybinds:
        if (keybind.match("input_clear", e) && store.prompt.input !== "") {
          // ...
        }
        if (keybind.match("input_forward_delete", e) && store.prompt.input !== "") {
          // ...
        }
        // ...
        // BUT: There is no handler for a raw "backspace" key press.
      }}
      // ...
    />
    

    Since there's no if (e.name === "backspace") block, the default backspace behavior is being handled by the <textarea> component itself.
    This strongly suggests the bug is not in the opencode codebase, but in the underlying @opentui/core library that provides the <textarea> component.
    It seems the TextareaRenderable from @opentui/core doesn't have the logic to handle event.ctrlKey, event.altKey, or event.metaKey in combination with the backspace key.
    Could a maintainer confirm if this is the correct place to look? If so, I'm willing to continue the investigation over in the sst/opentui repository.

    Thanks!

  5. thdxr
    assigned
    kommander
    on Nov 4, 2025
  6. kommander commented on Nov 17, 2025

    @kommander
    kommander
    on Nov 17, 2025 – with Linear
    Contributor
    More actions

    Newer versions of opentui/opencode should use kitty keyboard at least, but Ghostty does not support kitty keyboard and emits "\u0015" which is ctrl+u for cmd+backspace.

  7. kommander commented on Nov 17, 2025

    @kommander
    kommander
    on Nov 17, 2025 – with Linear
    Contributor
    More actions

    So this can only have worked in earlier versions if ctrl+u was mapped to delete line.

  8. knotbin commented on Nov 17, 2025

    @knotbin
    knotbin
    on Nov 17, 2025
    Author
    More actions

    this actually works now. not exactly the same functionality as it was before but it's functional now

  9. knotbin
    closed this as completedon Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @kommander
    kommander

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

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.