Mac editing shortcuts (cmd+arrows, cmd+delete, option+delete) not forwarded to TUI apps using Kitty keyboard protocol
Pre-submit Checks
- [x] I have searched Warp bugs and there are no duplicates
- [x] I have searched Warp known issues page and my issue is not there
- [x] I have an issue with AI and have included the debugging ID (Optional, but helps expedite the AI quality fix). Debugging ID instructions
- [x] I have technical issue and have included the logs (optional, but helps expedite the bug fix). Log instructions
Describe the bug
When a TUI app enables the Kitty keyboard protocol (CSI u) for its input, Warp does not forward standard macOS editing shortcuts to the app. The same shortcuts work correctly in Ghostty and Kitty with the same app and the same protocol enabled, so this appears to be a Warp-side encoding gap.
To reproduce
- Install Claude Code (npm i -g @anthropic-ai/claude-code)
- Run with the fullscreen renderer enabled: CLAUDE_CODE_NO_FLICKER=1 claude
- Type some text into the prompt
- Try the standard Mac editing shortcuts:
- cmd+← / cmd+→ — jump to start/end of line
- cmd+delete — delete whole line
- option+← / option+→ — jump by word
- option+delete — delete previous word
Expected behavior
Each shortcut performs its standard macOS line-editing action inside the Claude Code prompt (as it does in Warp's normal shell prompt, and as it does in Ghostty when running the same Claude Code binary in NO_FLICKER mode).
Actual
The shortcuts are either silently dropped or produce no effect inside the TUI's input. The app's input handler never receives a usable keypress. Falling back to raw control sequences (Ctrl+A, Ctrl+E, Ctrl+U, Ctrl+W) works, confirming the app's input layer is fine — Warp simply isn't translating the Mac shortcuts into the Kitty-encoded sequences the app is listening for
Screenshots, videos, and logs
No response
Operating system (OS)
macOS
Operating system and version
26.3.1 (a) (25D771280a)
Shell Version
zsh 5.9 (arm64-apple-darwin25.0)
Current Warp version
v0.2026.04.15.08.45.stable_02
Regression
Yes, this bug started recently or with an X Warp version
Recent working Warp date
Before the no-flicker feature from claude code
Additional context
No response
Does this block you from using Warp daily?
No
Is this an issue only in Warp?
Yes, I confirmed that this only happens in Warp, not other terminals.
Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e
None
need this
+1 with some triage context — variants of this same family of shortcuts have been reported repeatedly across the years; consolidating signal here may help prioritization.
Related, still open
- #807 (open since 2022-03, 13 comments, 👍10) — cmd/option + arrow/backspace in long-running command mode
- #1469 — cmd+backspace deletes the word but also pollutes the clipboard
- #2686 (👍6) — option/cmd shortcuts broken when vim/neovim is open in Warp
- #2845 — cmd+left/right direction reversed
- #1464 — prev/next word shortcuts regressed in v0.2022.05.30
Same family, already resolved (so the fix pattern exists)
- #6616, #6947 — shift+enter / newline-in-TUI (closed completed 2025-07)
User impact For workflows where these shortcuts are muscle memory — Claude Code, vim in TUI mode, anything that enables Kitty CSI u — this is a daily papercut. The same TUI binary behaves as expected in Ghostty / Kitty / iTerm, so the practical fallback today is to leave Warp for those sessions. That is the main reason I'd love to see the encoding-gap fix here land sooner rather than later.
Same issue also reproduces inside tmux on macOS — Option+Backspace (and the rest of the Mac editing shortcuts) don't reach the inner shell when tmux is the frontmost TUI. Worth flagging in case tmux's CSI u handling is a separate path from Claude Code's.
- Warp:
v0.2026.05.06.15.42.stable_04 - macOS: 26.4.1 (25E253), Darwin 25.4.0
- Hardware: MacBook Pro (Mac14,10), Apple M2 Pro, 32 GB
Still reproduces on the current stable — confirming with version data.
Hit this with Claude Code: ⌘+Backspace and ⌥+Backspace silently do nothing in the prompt, while they work fine at a normal Warp shell prompt and in native macOS apps. Ctrl+U / Ctrl+W work, confirming it's the CSI-u encoding gap described here (and in the dup #9725), not the app's input layer.
Environment:
- Warp:
v0.2026.06.03.09.49.stable_03(latest Stable) - macOS: 26.0 (25A354), Apple Silicon (arm64)
- Claude Code:
2.1.173
Isolation:
- ✅ ⌘/⌥+Backspace work in TextEdit and at a plain Warp shell prompt
- ❌ Both fail inside the Claude Code prompt; only
Ctrl+U/Ctrl+Wreach it - Toggling
input_box_type_settingbetweenuniversalandclassic(full restart) makes no difference — consistent with this being CSI-u encoding, not the input box.
Confirmed trigger + workaround: It's specifically Claude Code's fullscreen/alternate-screen renderer enabling the Kitty keyboard protocol. Launching with CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 (which drops Claude Code back to legacy keyboard input) fully restores both shortcuts — because in legacy mode Warp correctly maps ⌘/⌥+Backspace to \x15/\x17. So the gap is purely in Warp's CSI-u encoding of these two keys (per #9725: should be ESC[127;9u / ESC[127;3u).
Would love to see the encoding fix land — it bites every Warp + Claude Code user the moment Claude Code's fullscreen renderer is active.
Same issue happened to me.
Environment:
Warp: v0.2026.06.10.09.27.stable_01 (latest Stable) macOS: 26.5.1 (25F80), Apple Silicon (arm64) Claude Code: 2.1.178
Same issue with Pi macOS 27 Public Beta, M3 Air Pi Harness via Remote SSH
CMD UP and ALT Up not working
@oz-agent would you implement?
@Xytronix
I'm starting work on product and tech specs for this issue.
You can view the conversation on Warp.
I created a new spec PR for this issue.
Preview generated specs:
- Product spec: specs/GH9159/product.md
- Tech spec: specs/GH9159/tech.md
Next steps:
- Review the spec PR and confirm that the proposed approach looks right.
- Request or make any needed spec updates before moving on to implementation.
Powered by Oz
Affecting me as well - mac os, claude code (2.1.211), warp (v0.2026.07.08.17.54.stable_02). Churning off Warp to cmux as a result. Very frustrating.
The macOS editing-key behavior this spec covers is implemented, tested, and working.
Cmd/Option+ Backspace/Delete/arrows now carry their modifier underDISAMBIGUATE_ESCAPE, byte-parity with Kitty/Ghostty:Cmd+Backspace → CSI 127;9u,Cmd+Left → CSI 1;9D,Cmd+Delete → CSI 3;9~,Cmd+F5 → CSI 15;9~.- Root cause was encoder gating in
crates/warp_terminal/src/model/escape_sequences*: the CSI-u gate never checkedkeystroke.cmdand blanket-excludedalton macOS; the legacy modifier byte couldn't represent Super. Per the Kitty spec, arrows/Delete keep their legacyCSI …/CSI …~forms with the modifier parameter — only Backspace (codepoint 127, no legacy code) usesCSI … u. - Verified: 23 unit tests (including modifier×editing-key regression cases that were entirely absent — the reason this regressed),
clippy/fmtclean, and confirmed live in a locally-built GUI app —⌘⌫/⌥⌫/⌘←→/⌥←→perform line/word edits inside a TUI (Claude Code) running in the built Warp. - Build note: the GUI bundle needs only Command Line Tools, not full Xcode.app (
app/DockTilePluginbuilds viamake+clang;script/macos/bundleusescargo bundle+ CLT utilities, noxcodebuild).
Reference implementation (branch ready): https://github.com/FreddieMcHeart/warp/pull/1
Happy to open the PR against upstream once this moves to ready-to-implement.
Implementation doc
Design
The Kitty spec keeps the legacy escape form for keys that own a legacy code; only keys with a Unicode/PUA codepoint and no legacy code use the CSI … u terminator.
| Key class | Encoding under the protocol |
|---|---|
| Letters, Enter (13), Tab (9), Esc (27), Backspace (127), Space (32), F13–F35 | CSI <code>;<mods> u |
| Arrows, Home/End | CSI 1;<mods> {A,B,C,D,H,F} |
| Delete / Insert / PageUp / PageDown | CSI {3,2,5,6};<mods> ~ |
| F1–F12 | CSI 1;<mods> {P,Q,R,S} / CSI <n>;<mods> ~ |
Kitty reuses the xterm modifier parameter (1 + shift·1 + alt·2 + ctrl·4 + super·8) for the legacy-form keys — identical to the CSI-u modifier field — so one helper serves both.
Changes (crates/warp_terminal/src/model/)
escape_sequences/kitty_keyboard_protocol.rs— the gate: addkeystroke.cmdto the ambiguity test (Super has no legacy encoding); replace the macOS blanketaltexclusion with an IME-composition test based on the OS-providedchars(Option+a → å and Option+Space → nbsp still compose; Option + Backspace/Delete/arrows act as modifiers).escape_sequences.rs— legacy encoders: newmodifier_param()=1 + shift + alt|meta·2 + ctrl·4 + cmd·8(single source of truth, Super-aware, multi-digit), used by arrows/Home/End, a new modified-Deletehandler (CSI 3;<mods>~), and the function-key path. The dead single-byteto_modifier_escape_byteis removed.escape_sequences_tests.rs: regression tests forCmd/Option × Backspace/Delete/arrows,Option+Spacecomposition, andCmd+function-key.
Backward compatibility
All pre-existing tests pass unchanged (modifier_param matches the old values for every shift/alt/ctrl combo); non-macOS behavior unchanged; Option-as-Meta preserved (the meta path runs before the new Delete handler); macOS IME composition preserved for printable Option combos.
Same issue here, and it's not limited to opt+backspace — cmd+backspace is also swallowed.
Environment:
- Warp: v0.2026.07.15.08.55.stable_01 (macOS)
- Claude Code: 2.1.215
Behavior:
- In the normal Warp prompt, cmd+backspace correctly deletes the whole line.
- Inside Claude Code (a raw-mode/full-screen TUI), cmd+backspace does nothing — the keypress never reaches the child process.
- Ctrl+U works fine inside Claude Code and deletes to line start, which confirms the underlying line editing is fine — Warp is just intercepting cmd+backspace at its own input-editor layer instead of forwarding it.
This used to work in an earlier Warp version and broke after an update, so it looks like a regression. Same class of bug as the opt+backspace case in this issue — Warp only forwards a small set of keys (PAGE UP/DOWN, HOME, END) to full-screen programs and consumes the rest.
Would love to see cmd+backspace / opt+backspace forwarded (or made configurable to forward) when a raw-mode app is running.
Hi all. Thanks for pushing this forward. I'm investigating
I’m seeing what appears to be the same issue. I can reproduce it in Claude Code’s new fullscreen TUI and in OpenCode. In Claude Code, disabling fullscreen mode makes the affected Command/Option editing shortcuts work normally again. I do not encounter the issue in Codex when running it in the same Warp environment.
Exit TUI solved my problem
On Sat, Jul 25, 2026 at 2:43 PM Shashwat Jain @.***> wrote:
sahabji0P left a comment (warpdotdev/warp#9159) https://github.com/warpdotdev/warp/issues/9159#issuecomment-5077356862
I’m seeing what appears to be the same issue. I can reproduce it in Claude Code’s new fullscreen TUI and in OpenCode. In Claude Code, disabling fullscreen mode makes the affected Command/Option editing shortcuts work normally again. I do not encounter the issue in Codex when running it in the same Warp environment.
— Reply to this email directly, view it on GitHub https://github.com/warpdotdev/warp/issues/9159?email_source=notifications&email_token=ACRU2JEQTVDEWQ3W7ESRQRT5GRJIHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBXG4ZTKNRYGYZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5077356862, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRU2JAALQ4ZJDPTHZGR6WD5GRJIHAVCNFSNUABFKJSXA33TNF2G64TZHMZTQNBSGE4TSOJQHNEXG43VMU5TIMZQGU4DENJYGQ2KC5QC . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS https://github.com/notifications/mobile/ios/ACRU2JAJEFHKUOBCIWPYEFL5GRJIHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBXG4ZTKNRYGYZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y and Android https://github.com/notifications/mobile/android/ACRU2JC5Z7U3YFJ2FXVDUGT5GRJIHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBXG4ZTKNRYGYZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI. Download it today! You are receiving this because you commented.Message ID: @.***>
@oss-maintainers — could this be relabeled ready-to-implement? And a scope question below, because I think there are two blockers here and the open PR only addresses one.
Being honest about why I'm pushing: this is pretty frustrating, and it's the single thing keeping Warp from being my daily driver. I want to use Warp — I have it installed, I keep coming back to it — but I run Claude Code all day, and having the standard macOS editing keys silently do nothing there is constant low-grade friction that I cannot configure my way out of. There is no setting, no keybinding, and no workaround that fixes it from the outside; I've checked.
On the label
This is labeled bug and repro:high, but it also carries ready-to-spec, which routes it down the feature path. Per CONTRIBUTING.md, ready-to-spec is "reserved for feature requests," and "bug fixes can go straight to a code PR once the report is reproducible or otherwise actionable." The result is that a fix is sitting behind a spec queue it arguably doesn't need:
- Spec PR #13695 has been open since Jul 14 with no human review (last activity Jul 19).
- Code PR #14012 is written and tested, but Oz declined to review it because no linked issue carries
ready-to-implement.
Nothing is technically blocked — the chain is just parked.
Blocker 1: the CSI-u gate drops Cmd
Reading current master, crates/warp_terminal/src/model/escape_sequences/kitty_keyboard_protocol.rs:34:
let mut is_ambiguous = keystroke.key == "escape" || keystroke.ctrl || keystroke.meta;
keystroke.cmd is never consulted. Under DISAMBIGUATE_ESCAPE_CODES, Cmd+Backspace is therefore judged unambiguous, skips CSI-u encoding, and falls through to legacy encoding — which has no representation for Super at all, so the modifier is silently dropped.
The encoder it skipped already handles Super correctly (kitty_keyboard_protocol.rs:201):
if keystroke.cmd {
modifiers += 8;
}
There is also no fallback. app/src/terminal/view/init.rs:512-519 binds cmd-backspace to terminal:executing_command_delete_line_start, but gates it on LongRunningCommand, which is suppressed while the alt screen is active. So in a fullscreen TUI the binding can't fire and the encoder drops the modifier — the keystroke goes nowhere.
That matches every report in this thread: Ctrl+U works, Cmd+Backspace does nothing, and turning off Claude Code's fullscreen mode restores it (that leaves the alt screen, so the LongRunningCommand binding fires again).
This is what #14012 fixes.
Blocker 2: Cmd+C is consumed before it ever reaches the encoder
Cmd+C is affected by this issue too, but it has a second, independent cause — and I don't think #14012 resolves it.
app/src/terminal/view/init.rs:376:
EditableBinding::new("terminal:copy", "Copy", TerminalAction::Copy)
.with_custom_action(CustomAction::Copy)
.with_context_predicate(id!("Terminal") & !id!("IMEOpen")),
That predicate is true whenever the terminal is focused, including while an alt-screen TUI owns the screen. The keybinding layer runs ahead of the escape-sequence encoder, so Cmd+C is consumed by terminal:copy and never reaches the encoding path at all. Fixing the CSI-u gate doesn't change that.
The user-visible result: in Claude Code's fullscreen mode you select text inside the TUI, press Cmd+C, and Warp runs its own copy against its own (empty) selection. Nothing useful is copied. Claude Code binds selection:copy to Ctrl+Shift+C / Cmd+C by default, so the binding is already there waiting — the keystroke just never arrives.
In fairness, this half is not Warp-specific: Cmd+C is claimed by the host app in most macOS terminals by default, and I've confirmed it's broken out of the box in Ghostty too. The difference is that Ghostty ships an escape hatch — a performable: keybind prefix, where an action only consumes the keystroke if it can actually be performed, so performable:cmd+c=copy_to_clipboard passes the key through whenever there's no terminal-side selection to copy. Warp has no config-level equivalent, so there's nothing a user can do about it from the outside.
The fix looks structurally identical to what #14335 does for the editing keys: narrow the predicate so terminal:copy yields while an alt-screen TUI has the Kitty protocol enabled, e.g.
id!("Terminal") & !id!("IMEOpen") & !(id!("AltScreen") & id!(KEYBOARD_PROTOCOL_ENABLED_KEY))
Scope question: would you prefer this folded into #9159 (the title already covers "mac editing shortcuts... not forwarded to TUI apps"), or split into its own issue so #14012 can land against a clean, narrow scope? Happy to file separately if that's cleaner — I'd just rather not open a duplicate without asking. My concern is that if #14012 merges alone, this issue reads as resolved while Cmd+C is still broken.
Environment
- Warp 0.2026.07.22.09.01.01 (macOS)
- Claude Code with
"tui": "fullscreen"
Reproduces as described: Cmd+Backspace, Cmd+Delete, Cmd+←/→ do nothing in Claude Code's fullscreen TUI, and Cmd+C doesn't copy the in-TUI selection. The editing keys all work in Warp's own prompt, and in Ghostty and Zed's terminal. Cmd+C is the exception — as noted under blocker 2, it's broken by default in Ghostty too.
To be clear about provenance: the above is from reading master, not from running a patched build — I haven't verified #14012 locally.
Why it's worth unblocking
CLI agents are a major Warp use case — arguably the use case you're building toward. And in the most common one, the standard macOS editing keys silently do nothing while Cmd+C quietly copies the wrong thing. That's a rough first impression for exactly the users you most want to keep.
To be fair about where Warp does and doesn't stand out: the two blockers are not the same story.
Blocker 1 is Warp-specific. The original report on this issue notes that Cmd+← and Cmd+Delete work normally in Ghostty, and I've confirmed the same in cmux (a Ghostty-based terminal) and in Zed's terminal — Cmd+Backspace deletes the input line in Claude Code in all of them, and does nothing in Warp. That one is a straightforward gap against peers.
Blocker 2 is more widely shared — Cmd+C is claimed by the host app in most macOS terminals by default, Ghostty included. But Ghostty gives users a way out with its performable: keybind prefix: an action only consumes the keystroke when it can actually be performed, so copy passes through whenever there's no terminal-side selection. Warp has no equivalent, which means Warp users have no path to fixing this themselves — it has to be fixed upstream. That's a well-tested design worth borrowing.
None of this is hard. Blocker 1 is a one-line gate change with a tested PR already open. Blocker 2 is a predicate change of the same shape you've already accepted elsewhere in that same file.
Adding a byte-level capture, plus one data point I don't think anyone has tried yet: modifyOtherKeys level 2 is ignored too.
This thread is all about kitty/CSI-u, so we went looking for a second protocol Warp might honor instead. It doesn't.
Environment:
- Warp v0.2026.07.22.09.01.01
- macOS 26.5.2, arm64
- TUI is our own app (OpenTUI based), not Claude Code, so this is not renderer specific
What we did
Sent ESC[>4;2m on startup, gated to TERM_PROGRAM=WarpTerminal, then logged every raw stdin chunk. If Warp honored level 2, modified Backspace would arrive as CSI 27;9;127~ and CSI 27;3;127~.
What came back
Across 81 captured chunks in two runs, not one CSI 27;<mod>;127~ sequence. The request is a silent no-op.
Three things worth separating out:
1. Cmd+Delete arrives as bare Backspace. Twelve consecutive 0x7f bytes while clearing hello world one character at a time:
decimal=[127] hex=[7f] escape="\x7f"
decimal=[127] hex=[7f] escape="\x7f"
... 12 total, ~180ms apart
This is the part that makes it unfixable downstream. 0x7f with the modifier stripped is byte-identical to plain Backspace, so no application binding can tell the two apart. It isn't that the key is swallowed, it's that it arrives disguised as a different key.
2. Warp reports flags 0 for kitty. The progressive enhancement query came back \e[?0u.
3. But CSI-u is clearly implemented for some keys. Ctrl+C in the same session:
decimal=[27,91,57,57,59,53,117] hex=[1b 5b 39 39 3b 35 75] escape="\e[99;5u"
So Warp emits kitty CSI-u for Ctrl+C while simultaneously reporting flags 0 and stripping Cmd from Backspace. That inconsistency may be more useful for tracking this down than the missing shortcuts themselves.
Re: the comment above that this is implemented under DISAMBIGUATE_ESCAPE, we're on a build newer than that and still see the above, so either it hasn't shipped to stable or the level 2 and flags 0 behavior is a separate path.
Happy to rerun with any specific sequence or flag combination if that helps narrow it.
This issue has been labeled ready-to-implement and is open for contributions involving code changes. If you'd like to tackle it, feel free to open a pull request against this issue. You can also comment @oz-agent on this issue to have the bot draft an implementation PR automatically.
@oz-agent
Your GitHub account is not connected to Warp. Connect it here.
@etayco
I'm not starting implementation because the linked spec PR(s) have not been marked plan-approved. Linked spec PR(s): #13695.
You can view the conversation on Warp.
I did not start implementation because Linked spec PR(s) exist for this issue but none are labeled plan-approved: #13695.
Powered by Oz