Escape key not received in Ghostty terminal
Resolved 💬 2 comments Opened Mar 20, 2026 by mrmom Closed Apr 17, 2026
Description
Escape key does not work at all in Claude Code when running inside Ghostty terminal. No Escape-bound actions fire — including dismissing the help overlay (? then Escape), chat:cancel, or app:interrupt.
Environment
- Claude Code version: latest (installed via CLI)
- Terminal: Ghostty 1.3.1 (stable)
- OS: macOS (Darwin 25.2.0)
- TERM:
xterm-ghostty - Shell: zsh
- Not inside tmux/screen
Reproduction steps
- Open Ghostty with default config (no custom keybindings)
- Run
claude - Press
?to open help overlay - Press Escape — overlay does NOT close
What was tried
- Ctrl+[ (sends same 0x1B byte as Escape): also does not work
- Custom keybindings.json binding
escapetoapp:interruptin Global and Task contexts: no effect - Ghostty config
keybind = escape=unbindandkeybind = escape=text:\x1b: no effect - TERM=xterm-256color: no effect
- No key remapping tools installed (no Karabiner, BetterTouchTool, Hammerspoon, etc.)
- Ghostty terminfo entry (
xterm-ghostty) looks standard
Expected behavior
Escape key should work for all default bindings (chat:cancel, help:dismiss, app:interrupt when configured, etc.)
Notes
Ctrl+C works fine as an interrupt. The issue is specific to the Escape key (and Ctrl+[) not being recognized by Claude Code.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗