[PR #7320] feat: add double-ESC keybind to clear input field #12346

Open
opened 2026-02-16 18:17:15 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7320

State: open
Merged: No


Summary

  • Add double-ESC keyboard shortcut to clear input field content
  • Add documentation for the new shortcut

Motivation

Many popular CLI tools have adopted this pattern:

  • Claude Code - supports double-ESC to clear input
  • Gemini CLI - supports double-ESC to clear input

This has become a common UX pattern that users expect in terminal-based AI assistants.

Changes

  • packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx: Implement double-ESC detection (300ms threshold) to clear input
  • packages/web/src/content/docs/keybinds.mdx: Add documentation under "Desktop prompt shortcuts"

Proofs

https://github.com/user-attachments/assets/a1360c79-aeb9-4e81-834a-afdd198d3bbf

closes

7319

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7320 **State:** open **Merged:** No --- ## Summary - Add double-ESC keyboard shortcut to clear input field content - Add documentation for the new shortcut ## Motivation Many popular CLI tools have adopted this pattern: - **Claude Code** - supports double-ESC to clear input - **Gemini CLI** - supports double-ESC to clear input This has become a common UX pattern that users expect in terminal-based AI assistants. ## Changes - `packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx`: Implement double-ESC detection (300ms threshold) to clear input - `packages/web/src/content/docs/keybinds.mdx`: Add documentation under "Desktop prompt shortcuts" ## Proofs https://github.com/user-attachments/assets/a1360c79-aeb9-4e81-834a-afdd198d3bbf ## closes [7319](https://github.com/anomalyco/opencode/issues/7319)
yindo added the pull-request label 2026-02-16 18:17:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12346