[BUG] Pressing ESC key causes input to become unresponsive on Termux
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
On Termux (Android terminal emulator), pressing the ESC key causes the input bar to become completely unresponsive. After pressing ESC:
- Cannot type any characters into the input
- The session must be closed and restarted to continue
This is a Termux-specific issue - the same behavior does not occur on other terminals.
What Should Happen?
Pressing ESC should either:
- Have no effect when at the main input prompt, or
- Cancel any current operation and return focus to the input prompt
The input should remain functional after pressing ESC.
Steps to Reproduce
- Install Claude Code on Termux (Android)
- Run
claude - Press the ESC key
- Try to type anything
- Observe: no characters appear, input is unresponsive
- Only way to recover is to close and restart Claude
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Claude Code Version
2.1.22 (also reported on 2.1.23)
Platform
Anthropic API
Operating System
Other Linux (Android/Termux)
Terminal/Shell
Other (Termux - Android terminal emulator)
Additional Information
This may be related to how Ink (the terminal UI library) handles raw mode input on Termux. The ESC key may be triggering a state change that isn't properly recovered from.
Related Termux issues filed:
- #21675 - Input box collapses to zero height (rendering issue)
- #21677 - Terminal title updates cause notification overlay
Termux environment:
TERM=xterm-256colorCOLORTERM=truecolor
The ESC key handling may be putting stdin into a state that Termux doesn't recover from properly, or focus may be getting transferred to a non-existent UI element.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗