From 9768d60399f344c7ceb0c2ecec6cfd2a0e191176 Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Wed, 11 Feb 2026 12:33:41 -0800 Subject: feat: Add original-input-empty keybind condition (#3171) This PR adds a keybind condition called `original-input-empty` that is true when the TUI was invoked from an empty prompt line; users can use this to change behavior based on the original prompt's contents; for example: ```toml [keymap.emacs] "esc" = [ { when = "original-input-empty", action = "return-query" }, { action = "return-original" } ] ``` Thanks Hazilo in Discord for the suggestion. --- docs/docs/configuration/advanced-key-binding.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/docs/configuration/advanced-key-binding.md b/docs/docs/configuration/advanced-key-binding.md index 5027c5a2..1fe9c1e4 100644 --- a/docs/docs/configuration/advanced-key-binding.md +++ b/docs/docs/configuration/advanced-key-binding.md @@ -246,6 +246,7 @@ Conditions let a single key do different things depending on the current state. | `cursor-at-start` | The cursor is at position 0 | | `cursor-at-end` | The cursor is at the end of the input | | `input-empty` | The input line is empty (no text entered) | +| `original-input-empty` | The original query passed to the TUI was empty | | `list-at-start` | The selection is at the first entry (index 0) | | `list-at-end` | The selection is at the last entry | | `no-results` | The search returned zero results | -- cgit v1.3.1