Blake
26b83a5f5f
fix(cli): ignore terminal focus reports (salvage of #16780 )
...
Ghostty/macOS window or tab navigation (Cmd+Shift+[ / ], Alt+Tab,
etc.) can deliver terminal focus reports (CSI I / CSI O) to the
running TUI. prompt_toolkit does not map those sequences by default,
so its parser falls back to literal key presses (ESC, [, I/O) and
inserts `[I` / `[O` into the prompt buffer after the ESC byte is
handled.
Fix: register the two sequences as Keys.Ignore in ANSI_SEQUENCES at
parser level, plus a no-op kb.add(Keys.Ignore) handler so the
default self-insert path never inserts focus-report bytes.
Salvage notes: original PR put the helper in cli.py. Salvaged into
hermes_cli/pt_input_extras.py alongside install_shift_enter_alias /
install_ctrl_enter_alias to match the established pattern for
ANSI_SEQUENCES augmentation. setdefault → in-check so any prior user
registration wins.
Closes #16780
2026-05-29 00:31:44 -07:00
..
2026-05-28 22:26:25 -07:00
2026-05-18 10:14:38 -07:00
2026-05-29 00:28:02 -07:00
2026-05-29 00:31:44 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 12:17:12 +10:00
2026-05-28 22:26:25 -07:00
2026-03-14 14:27:20 +03:00
2026-05-28 23:25:52 -07:00
2026-05-29 00:25:36 -07:00
2026-05-17 23:28:45 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-30 02:35:29 -07:00
2026-05-29 00:21:54 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 00:13:29 -07:00
2026-05-14 22:27:09 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 16:07:15 +10:00
2026-05-28 22:26:25 -07:00
2026-05-05 13:46:20 -07:00
2025-10-01 23:29:25 +00:00
2026-05-28 22:26:25 -07:00
2026-03-17 02:53:33 -07:00
2026-04-21 01:56:35 -07:00
2026-04-28 04:58:22 -07:00
2026-04-21 06:06:16 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-18 21:43:59 -07:00
2026-04-29 23:18:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 09:56:40 +10:00
2026-05-28 22:26:25 -07:00
2026-05-25 15:18:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-30 04:32:06 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-02 01:49:55 -07:00
2026-05-28 22:26:00 -07:00
2026-05-28 21:40:39 -07:00
2026-05-27 14:31:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 10:49:33 -07:00
2026-05-14 09:05:31 -07:00
2026-05-06 04:02:02 -07:00
2026-05-27 13:55:51 -07:00
2026-04-28 06:45:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-07 13:04:08 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-17 02:29:41 -07:00
2026-05-28 22:26:25 -07:00
2026-04-20 12:23:05 -07:00
2026-04-19 22:44:47 -07:00
2026-05-28 22:26:25 -07:00
2026-03-24 08:19:23 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-16 12:15:45 -07:00
2026-03-30 17:34:43 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 00:43:32 -07:00
2026-04-08 00:41:36 -07:00
2026-05-21 16:40:04 +05:30
2026-05-16 00:57:39 -07:00
2026-03-19 15:16:35 +01:00
2026-05-28 22:26:25 -07:00
2026-05-07 13:04:08 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-07 05:46:05 -07:00
2026-05-28 22:26:25 -07:00
2026-05-26 20:51:59 -07:00
2026-03-30 13:28:10 +09:00
2026-05-28 22:26:25 -07:00
2026-04-26 18:50:49 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00