opencode icon indicating copy to clipboard operation
opencode copied to clipboard

cmd + backspace doesn't work

Open willleeney opened this issue 5 months ago • 6 comments

should delete the entire line but doesn't

willleeney avatar Jul 31 '25 16:07 willleeney

@willleeney do u still have this behavior? what terminal?

rekram1-node avatar Aug 29 '25 22:08 rekram1-node

@rekram1-node yeah, it is still broken and necessary.

It's a standard behavior in any terminal, at least on macOS. Works in Claude Code like a charm and it was a huge downgrade in convenience when comparing the opencode.

At this moment:

  • + backspace removes the last word (broken in opencode)
  • + backspace removes the entire line (broken in opencode)
  • + arrow left navigates cursor before the last word — it is the only one working
  • + backspace navigates cursor to the begiining of the line (broken in opencode)

what terminal?

Any of them. System standard, Warp, in-VsCode, in-IDEA, etc.

art-shen avatar Aug 30 '25 09:08 art-shen

thats strange im on macos works fine for me

tho i use ghostty

rekram1-node avatar Aug 30 '25 12:08 rekram1-node

@rekram1-node, to be precise, I did a granular testing (macOS 15.6)

iTerm 3.5.14

  • + backspace — ✅ works fine
  • + backspace — ❌ does nothing
  • + arrow left/right — ✅ works fine
  • + arrow left/right — ❌ does nothing

macOS Terminal 2.14 (455.1)

  • + backspace — ❌ doesn't remove the last word, only last character
  • + backspace — ❌ does nothing (beep)
  • + arrow left/right — ✅ works fine
  • + arrow left/right — ❌ does nothing (beep)

Warp v0.2025.08.20.08.11.stable_03

  • + backspace — ❌ doesn't remove the last word, only last character
  • + backspace — ❌ doesn't remove the last word, only last character
  • + arrow left/right — ✅ works fine!
  • + arrow left/right — ❌ doesn't remove the last word, only last character

All of this works fine for Claude Code in Warp.

Terminal in Cursor 1.4.5 (VSCode 1.99.3)

  • + backspace — ✅ works fine!
  • + backspace — ✅ works fine!
  • + arrow left/right — ✅ works fine!
  • + arrow left/right — ✅ works fine!

Terminal in IDEA 252.23892.409

TUI interface in IDEA seems to not update after deleting characters, and glitchy overall. For Claude Code TUI works fine.

  • + backspace — ✅ works fine
  • + backspace — ❌ works as + backspace
  • + arrow left/right — ✅ works fine
  • + arrow left/right — ❌ works as + left/reight

art-shen avatar Aug 30 '25 17:08 art-shen

wow very through that’s super nice of you thanks!

rekram1-node avatar Aug 30 '25 17:08 rekram1-node

In wezterm, a config change is needed but then it works:

-- ~/.wezterm.lua

local wezterm = require 'wezterm'
local act = wezterm.action

config.keys = {
  -- Make Command-Backspace equivalent to Ctrl-u; kill-line
  { key = 'Backspace', mods = 'CMD', action = act{SendString = '\x15'} },
}

return config

Eric162 avatar Dec 17 '25 19:12 Eric162