[GH-ISSUE #685] Warp sends modified keys as plain control keys (Shift+Enter, Alt+Backspace, Cmd+Backspace) #955

Closed
opened 2026-03-14 09:08:32 +03:00 by kerem · 1 comment
Owner

Originally created by @slimewell on GitHub (Feb 13, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/685

Summary

In Warp (macOS), several modified keys are emitted as plain control codes, causing keybind mismatches in OpenTUI consumers.

Capture Method

node -e "process.stdin.setRawMode(true); process.stdin.on('data', d => { if (d[0] === 3) process.exit(); console.log('Len:', d.length, 'Hex:', d.toString('hex'), 'Raw:', JSON.stringify(d.toString())) })"

Observed (macOS)

Ghostty (reference)

  • Shift+Enter -> 1b5b32373b323b31337e (\x1b[27;2;13~)
  • Alt/Option+Backspace -> 1b7f (\x1b\x7f)
  • Cmd+Backspace -> 15 (\x15)

Warp

  • Shift+Enter -> 0a (\n, linefeed)
  • Alt/Option+Backspace -> 17 (\x17, same as Ctrl+W)
  • Cmd+Backspace -> 15 (\x15, same as Ctrl+U)

Impact

Keybinds relying on modifier metadata may not trigger as expected in Warp.

Originally created by @slimewell on GitHub (Feb 13, 2026). Original GitHub issue: https://github.com/anomalyco/opentui/issues/685 ## Summary In Warp (macOS), several modified keys are emitted as plain control codes, causing keybind mismatches in OpenTUI consumers. ## Capture Method ```bash node -e "process.stdin.setRawMode(true); process.stdin.on('data', d => { if (d[0] === 3) process.exit(); console.log('Len:', d.length, 'Hex:', d.toString('hex'), 'Raw:', JSON.stringify(d.toString())) })" ``` ## Observed (macOS) ### Ghostty (reference) - Shift+Enter -> `1b5b32373b323b31337e` (`\x1b[27;2;13~`) - Alt/Option+Backspace -> `1b7f` (`\x1b\x7f`) - Cmd+Backspace -> `15` (`\x15`) ### Warp - Shift+Enter -> `0a` (`\n`, linefeed) - Alt/Option+Backspace -> `17` (`\x17`, same as Ctrl+W) - Cmd+Backspace -> `15` (`\x15`, same as Ctrl+U) ## Impact Keybinds relying on modifier metadata may not trigger as expected in Warp. ## Related - anomalyco/opentui#434 - anomalyco/opentui#555 - anomalyco/opencode#8645
kerem 2026-03-14 09:08:32 +03:00
  • closed this issue
  • added the
    core
    bug
    labels
Author
Owner

@simonklee commented on GitHub (Mar 9, 2026):

OpenTUI already handles the terminal-side pieces we can control: we negotiate kitty keyboard support and parse both kitty and modifyOtherKeys sequences when the terminal sends them.

The remaining problem is that Warp appears to collapse some modified keys to plain control bytes before they reach OpenTUI.

Once Warp sends those bytes, the modifier metadata is gone, so the new stdin parser/router still cannot distinguish:

  • Shift+Enter vs plain linefeed / Ctrl+J
  • Alt+Backspace vs Ctrl+W
  • Cmd+Backspace vs Ctrl+U

So this looks upstream to Warp rather than a remaining OpenTUI parsing bug.
Relevant Warp issues are still open:

There are still reasonable app-level fallbacks in OpenTUI, but the protocol-level fix has to happen in Warp.

<!-- gh-comment-id:4026205072 --> @simonklee commented on GitHub (Mar 9, 2026): OpenTUI already handles the terminal-side pieces we can control: we negotiate kitty keyboard support and parse both kitty and `modifyOtherKeys` sequences when the terminal sends them. The remaining problem is that Warp appears to collapse some modified keys to plain control bytes before they reach OpenTUI. Once Warp sends those bytes, the modifier metadata is gone, so the new stdin parser/router still cannot distinguish: - Shift+Enter vs plain linefeed / Ctrl+J - Alt+Backspace vs Ctrl+W - Cmd+Backspace vs Ctrl+U So this looks upstream to Warp rather than a remaining OpenTUI parsing bug. Relevant Warp issues are still open: - [warpdotdev/Warp#2037](https://github.com/warpdotdev/Warp/issues/2037) - support `modifyOtherKeys` and/or kitty keyboard - [warpdotdev/Warp#2528](https://github.com/warpdotdev/Warp/issues/2528) - comprehensive keyboard handling / kitty protocol - [warpdotdev/Warp#8462](https://github.com/warpdotdev/Warp/issues/8462) - current Shift+Enter / OpenCode compatibility request There are still reasonable app-level fallbacks in OpenTUI, but the protocol-level fix has to happen in Warp.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#955
No description provided.