Skip to content

fix(debug): Alt+Shift+D binding + surface capture feedback in the hint row - #552

Open
fentas wants to merge 2 commits into
masterfrom
fix-debug-keybinding
Open

fix(debug): Alt+Shift+D binding + surface capture feedback in the hint row#552
fentas wants to merge 2 commits into
masterfrom
fix-debug-keybinding

Conversation

@fentas

@fentas fentas commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Two fixes so the debug capture (Alt+Shift+D) actually works + gives clean feedback.

1. The binding never matched (no feedback at all)

The kitty keyboard protocol reports a letter by its unshifted codepoint + a shift-modifier bit. Alt+Shift+D is \x1b[100;4u (d=100), but the binding used \x1b[68;4u (D=68). On kitty-kbd terminals (Ghostty/kitty/foot/WezTerm) it never matched → the debug_capture Action never fired → the bytes were swallowed → nothing happened. Ctrl+Shift+I at defaults.zig:69 already used the correct lowercase (105); the Alt+Shift+* bindings had diverged. Bind the lowercase forms (keep the uppercase as a fallback). Same latent bug fixed for Alt+Shift+W (security_guard warnings).

2. Feedback now shows in the hint row (not inline scrollback)

The capture outcome (report saved → … / recording off … / save failed) is now shown via the status-bar hint row above the footer (TTL-cleared) instead of an inline stdout write that stacked up across presses and collided with the prompt. Falls back to an inline toast only when no status bar is configured. The debug_capture e2e now runs with the status bar on to exercise this path.

zig build test + zig build e2e (debug_capture) green; zig build green.

fentas and others added 2 commits July 2, 2026 17:31
The kitty keyboard protocol reports a letter key by its UNSHIFTED codepoint plus
a shift modifier bit — so Alt+Shift+D is `\x1b[100;4u` (100='d', mod 4=alt+shift),
not `\x1b[68;4u` ('D'=68). The debug_capture binding (and the pre-existing
security_guard_show_warnings / Alt+Shift+W binding, 87='W') used the uppercase
code, so on Ghostty/kitty/foot/WezTerm the CSI-u never matched: the Action never
fired and the meta-bytes were dropped by the CSI-u interceptor — pressing
Alt+Shift+D produced no feedback at all. (Ctrl+Shift+I at defaults.zig:69 already
uses the correct lowercase 105='i'.)

Bind the lowercase forms (`\x1b[100;4u`, `\x1b[119;4u`); keep the uppercase ones
as a fallback for any terminal that reports the shifted code.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The capture outcome ("report saved → …" / "recording off …" / "save failed")
now shows in the status-bar hint row (above the footer, TTL-cleared) instead of
being written inline to stdout — where it stacked up across presses and collided
with the shell prompt. Falls back to an inline toast only when no status bar is
configured. captureDebugReport returns the message; the proxy sets it via
sb.setHint + repaints so it appears immediately. The debug_capture e2e now runs
with the status bar on to exercise this path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@fentas fentas changed the title fix(keymap): Alt+Shift+D and Alt+Shift+W kitty bindings use the unshifted keycode fix(debug): Alt+Shift+D binding + surface capture feedback in the hint row Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant