Files
Claude-Code-Monitor/client/src/components/run
nntrivi2001 8f2dd5358e fix(run): keep Shift+Tab inside the terminal so claude's permission cycle works
xterm emits ESC[Z for Shift+Tab but, unlike plain Tab, never marks the
keyboard event cancelled, so the browser ran its default action and moved
focus out of the terminal. The pane saw only the first press, which made
`shift+tab to cycle` (claude's permission mode) look dead on /run while
working fine in a real terminal.

A custom key handler now calls preventDefault() on that one combo and still
returns true, so xterm's own handling — including the ESC[Z it sends — is
untouched; only the focus-moving default is suppressed. Verified against a
scratch tmux session: writing ESC[Z into the attach pty cycles claude's
status line from `bypass permissions on` to `auto mode on`.

Trade-off: Shift+Tab no longer tab-reverses out of the terminal; click
elsewhere to move focus.
2026-08-19 14:51:21 +07:00
..