diff options
| author | blasty <blasty@local> | 2026-07-25 20:19:34 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-25 20:19:34 +0200 |
| commit | baf599e143dbf23f33886ba03a60c5d9f3c19078 (patch) | |
| tree | e6d9193f66ea8ef69ee4c65dd6e4ca67efce07d2 /idatui | |
| parent | nav: tell the user something is happening when Esc needs a decompile (diff) | |
| download | ida-tui-baf599e143dbf23f33886ba03a60c5d9f3c19078.tar.gz ida-tui-baf599e143dbf23f33886ba03a60c5d9f3c19078.tar.xz ida-tui-baf599e143dbf23f33886ba03a60c5d9f3c19078.zip | |
nav: bind back to backspace as well — a bare Esc isn't reliable in a terminal
Esc-to-go-back needed two presses. It looked like the decomp pane was swallowing
the first one, but the RPC state dump before/after a single Esc settles it:
nav_depth 3 -> 3 action_back never ran
cursor.col 19 -> 20 +1 column, i.e. `right`
modal null nothing was up to eat the key
The keypress arrived as a right-arrow. \x1b is both Escape and the lead byte of
every arrow/function-key sequence (ESC [ C is right), so a terminal or tmux that
merges a lone Esc with what follows delivers something else entirely. Nothing in
the nav path touches cursor_x and there is no widget-level escape binding on the
code views, so this was never application logic — I spent two commits looking in
the wrong place before asking for the dump.
Bind back to "escape,backspace". Backspace is unambiguous, so going back never
depends on a byte the terminal can reinterpret; Esc still works wherever it's
delivered intact. tmux users generally want `set -sg escape-time 10` regardless.
docs/TEXTUAL_NOTES.md records the symptom and, more usefully, the triage: check
nav_depth in the state dump first — if the action never ran, it's the input
layer, not the logic.
Verified: backspace in the pseudocode pane takes nav 3 -> 2 and reloads the
previous function. Suite 192/0.
Diffstat (limited to 'idatui')
| -rw-r--r-- | idatui/app.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/idatui/app.py b/idatui/app.py index 57ec7df..5898489 100644 --- a/idatui/app.py +++ b/idatui/app.py @@ -3150,7 +3150,12 @@ class IdaTui(App): Binding("ctrl+b", "toggle_functions", "Names", show=False), Binding("tab,shift+tab", "toggle_view", "Disasm/Pseudocode", priority=True), Binding("ctrl+s", "save", "Save"), - Binding("escape", "back", "Back"), + # Esc is IDA's muscle memory, but a bare \x1b is ambiguous in terminals: + # it's also the lead byte of every arrow/function-key sequence, so a + # terminal or tmux that merges it (see tmux escape-time) delivers the + # keypress as e.g. "right" and back silently doesn't happen. Backspace + # is unambiguous and always works. + Binding("escape,backspace", "back", "Back"), ] def __init__(self, open_path: str | None = None, keepalive: bool = True, |
