Support Ctrl+[ as Esc equivalent in both normal and vim input modes
Resolved 💬 5 comments Opened Mar 11, 2026 by Sherlockedb Closed Mar 29, 2026
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Ctrl+[ is a standard ANSI terminal keybinding that sends the exact same escape sequence as the Esc key. However, Claude Code does not recognize
Ctrl+[ as Esc in either normal mode or vim mode.
This forces users to physically move their hand to press Esc, breaking the home-row muscle memory that terminal users rely on. The issue affects both vim mode (where Ctrl+[ should exit insert mode) and normal mode (where Esc dismisses/cancels input).
Proposed Solution
Map Ctrl+[ to Esc in all input modes:
- Normal mode: same effect as pressing
Esc - Vim mode: exit insert mode, identical to
Esc
This is consistent with standard terminal, readline, and vim behavior where Ctrl+[ has always been a first-class equivalent to Esc.
Alternative Solutions
- Using physical
Esc: works, but requires moving hand away from the home row
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
- I'm in Claude Code's input box typing a message
- I want to cancel or switch to vim normal mode
- I instinctively press Ctrl+[ (standard terminal habit)
- Currently nothing happens — I have to reach for the Esc key
- With this feature, Ctrl+[ would work identically to Esc
Additional Context
- OS: macOS, Shell: zsh, Chip: Apple Silicon (arm64)
- Ctrl+[ producing the escape sequence is defined ANSI terminal behavior, not a vim-specific concept
- This is a common request from terminal power users who avoid moving hands off the home row
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗