warp icon indicating copy to clipboard operation
warp copied to clipboard

OPTION/CMD + ARROW LEFT/RIGHT or BACKSPACE not working as intended when Warp is in long-running command mode

Open jonashojer opened this issue 4 years ago • 15 comments

Describe the bug

Whenever I elevate my rights to root through SSH I cannot use either the OPTION or CMD with ARROW LEFT/RIGHT or  to either skip the whole word, skip to the end/start of the line or deleting the next/previous word or the whole line.

To Reproduce

Steps to reproduce:

  1. SSH to a RHEL based server(havn't tested on anything else) as normal user(needs wheel permissions)
  2. Execute sudo su - to elevate to root
  3. Write something like "asdf qwerty"
  4. Try to use 'CMD+ARROW-LEFT'
  5. You can also try to 'CMD+BACKSPACE'
  6. Also you can try to 'OPTION+ARROW-LEFT'
  7. You could also move the cursor to the start of the line and do the commands with ARROW-RIGHT or DELETEKEY

Expected behaviour

4. When having the cursor at the end of the line this should skip both words and get back to the start of the line
5. When having the cursor at the end of the line this should delete the whole line
6. When having the cursor at the end of the line this move the cursor to the first letter in the second word(in my example it should move the cursor in front of q)

Screenshots

No response

Operating System

MacOS

OS Version

12.2.1

Additional context

No response

jonashojer avatar Mar 11 '22 13:03 jonashojer

I also see this behavior when starting the Julia REPL; pushing CMD + ARROW_LEFT or right seem to just insert a \t or something?

quinnj avatar Mar 16 '22 02:03 quinnj

In fact, here's the exact unicode point that gets inserted:

julia> x = ""
"\uf703"

quinnj avatar Mar 16 '22 02:03 quinnj

These shortcuts work when the Warp input area is showing.

When you're in a REPL or a subshell, you're interacting directly with the shell which doesn't have Warp's editor functionality.

Please upvote https://github.com/warpdotdev/Warp/issues/64!

zheng avatar Mar 22 '22 19:03 zheng

I am closing this because this is not a bug, and it's actually what the terminal experience is outside of Warp. In order to get the desired behavior, we want to allow support for subshells to also be bootstrapped with Warp's input editor. Please subscribe to #64.

zheng avatar Mar 25 '22 16:03 zheng

I am not sure why this is intended. Both the built-in Terminal app and iTerm2 do not behave like this and I could for sure find other terminal apps which do the same.

jonashojer avatar Mar 28 '22 10:03 jonashojer

@jonashojer sorry about that - I was mistaken about the shell behavior without the warp input editor. reopening this!

zheng avatar Mar 28 '22 14:03 zheng

I brought this up w/ some friends and they mentioned this iTerm2 setting that is perhaps relevant image i.e. it also sends the correct escape sequence that subshells/repls are expecting.

quinnj avatar Mar 28 '22 17:03 quinnj

What's the status of this? Any workarounds? Until we get the subshell I would like to at least be able to use the basic keyboard shortcuts the same way I do in other terminals

Ciebiada avatar May 07 '22 09:05 Ciebiada

Any status on this?

jonashojer avatar Jun 29 '22 11:06 jonashojer

I am connecting "gcloud compute ssh" and can not move next/previous word in WARP

normally mac os terminal and connected gcloud bash allow me to go next word by "option+right arrow" in warp it doesnt work for "gcloud sql connect", too

yusufdonmez avatar Apr 01 '23 20:04 yusufdonmez

Has this issue not been resolved yet?

ops-jaeha avatar Jul 15 '24 07:07 ops-jaeha

Still experiencing this on the latest version. Adding my environment details as this is now a very common workflow with Claude Code.

Environment:

  • Warp: v0.2026.04.08.08.36.02
  • macOS: 26.3.1 (Apple Silicon, arm64)
  • Shell: zsh
  • Long-running command: claude (Claude Code v2.1.100)

Affected shortcuts (none work in long-running command mode):

Shortcut Expected Actual
Cmd+← Jump to start of line Nothing
Cmd+→ Jump to end of line Nothing
Cmd+Backspace Delete entire line Nothing
Option+← Move back one word Nothing
Option+→ Move forward one word Nothing
Option+Backspace Delete previous word Nothing

These shortcuts previously worked in the same Warp + Claude Code setup. With the rise of interactive CLI agents (Claude Code, Codex, etc.), this issue now affects a much larger number of users than SSH/sudo subshells alone. Would love to see this prioritized.

catallactics avatar Apr 10 '26 10:04 catallactics

Still broken on latest stable (post-KKP, 2026-04) — adding voice from another OpenCode / Claude Code user on macOS.

Environment

  • macOS Sequoia 15.x
  • Warp latest stable (post-KKP rollout 2026-03-20)
  • opencode v1.0.x running as TUI inside Warp

Shortcuts that still don't reach the running TUI:

  • Cmd+Left / Cmd+Right — expected: jump to line start / end
  • Cmd+Backspace — expected: delete to line start
  • Cmd+Z / Cmd+Shift+Z — expected: undo / redo (mapped to super+z / super+shift+z in opencode defaults)
  • Option+Backspace — intermittent; sometimes works post-KKP, sometimes captured by Warp UI

Working post-KKP (for reference):

  • Shift+Enter ✅ (resolved by #8462 fix)
  • Ctrl+A / Ctrl+E ✅
  • Option+Left / Option+Right ✅

Root cause (per #2037 thread): KKP rollout fixed Shift+Enter, but the super (Cmd) modifier encoding remains incomplete. Combined with the absence of any way to bind keys to raw hex / escape sequences (tracked in #4045, #8972), users have no workaround inside Warp short of installing Karabiner-Elements or switching terminals.

Impact: opencode and Claude Code are now mainstream TUI workflows. The inability to use macOS-standard text editing keys is a daily friction point and is actively pushing users to Ghostty / iTerm2 — see also @romanwozniak's recent comment on the now-closed #8462 raising the same gap.

Asks (any single one unblocks the user):

  1. Complete super modifier encoding under Kitty Keyboard Protocol (most consistent with Warp's existing direction)
  2. Add a text:\xHH / csi: / "Send Hex Code" action to keybindings.yaml or Settings > Keyboard shortcuts — the model used by Ghostty (keybind = cmd+left=text:\x01) and iTerm2 ("Send Hex Code" 0x01 / 0x05). The area:settings-keybindings label is already on #8972.

The ready-to-implement label here is encouraging — any ETA or preview build to test would be hugely appreciated. Happy to verify on Preview as soon as something lands.

Related: #4045, #8462 (closed but recent #8462 comment from @romanwozniak documents the same residual gap), #8972, #2037.

psh4607 avatar Apr 29 '26 12:04 psh4607

Still hitting this in current Warp (2026). It's a daily papercut when running TUI apps like Claude Code, where Cmd+Backspace (delete line) and Cmd+Left/Right (line start/end) silently do nothing.

Worth splitting into two halves, because only one is fixable today:

  • Option/Alt: fixable. Enabling extra_meta_keys (left_alt/right_alt = true) makes Warp forward Option as Meta, so Option+Backspace sends ESC+DEL and the TUI deletes a word correctly.

  • Cmd: not fixable. Cmd isn't a terminal modifier, so there's nothing to forward over the PTY. The standard cross-terminal solution is to let a key emit a raw byte sequence (Cmd+Backspace -> 0x15 / Ctrl+U, Cmd+Left/Right -> Home/End). iTerm2, Ghostty, and kitty all support this. Warp's keybinding vocabulary only triggers internal editor actions (editor_view:delete_all_left, etc.), none of which send raw bytes to the foreground process, so there's no workaround.

Concrete ask: a keybinding action that sends a literal escape/byte sequence to the running command (e.g. send_text / send_bytes). That one primitive would let users bind Cmd+Backspace -> Ctrl+U and close this for every TUI app at once.

marcindyguda avatar Jun 23 '26 07:06 marcindyguda

Ran into this today with opencode's TUI running inside Warp — adding a minimal repro that isolates it from any specific TUI framework.

Repro (no TUI app needed):

  1. In a Warp tab, run cat -v
  2. Press Left arrow alone → prints ^[[D
  3. Press Option+Left → prints ^[b (correctly translated to the classic Meta-b word-back sequence)
  4. Press Cmd+Left → prints ^[[D — identical to a bare Left arrow, with no way to distinguish it from an unmodified key press
  5. Press Enter, then Ctrl+D to exit

So Warp already does the right thing for Option (translating it into a sequence downstream readline/TUI apps understand), but Cmd+Arrow is forwarded with the modifier fully stripped — not just mishandled by one specific app.

This is exactly what's now hitting opencode: its keybind system supports binding super+left/super+right (its name for Cmd) to actions like "move to line start/end," but the binding can never fire because the byte stream Warp forwards for Cmd+Left/Right is indistinguishable from an unmodified arrow press. Same failure mode as the Claude Code/Codex reports above.

+1 on the proposed send_text/send_bytes keybinding action — that would let us map Cmd+Left/Right to whatever escape sequence the foreground TUI expects, without waiting on per-app fixes.

Warp 0.2026.07.01.09.21.01, macOS, zsh

senaev avatar Jul 11 '26 15:07 senaev