A pi extension that clears the editor input on double Escape.
Press Esc twice within 500 ms while the editor has content to clear it.
- First Esc passes through normally — autocomplete dismissal and other built-in Esc behaviour still works.
- Only the second Esc (within the window) is consumed.
- When the editor is already empty, both presses pass through to pi's built-in
doubleEscapeAction(tree,fork, ornone).
Works with both legacy terminals and the Kitty keyboard protocol.
pi install https://github.com/iRonin/pi-clear-on-double-escOr add to ~/.pi/agent/settings.json:
{
"packages": [
"https://github.com/iRonin/pi-clear-on-double-esc"
]
}| Editor state | Single Esc | Double Esc |
|---|---|---|
| Has content | passes through (autocomplete, etc.) | clears editor |
| Empty | passes through | triggers doubleEscapeAction (tree/fork/none) |