Skip to content

Fix #361: make detach key configurable via hotkeys#365

Merged
asheshgoplani merged 1 commit intomainfrom
fix/361-configurable-detach-key
Mar 18, 2026
Merged

Fix #361: make detach key configurable via hotkeys#365
asheshgoplani merged 1 commit intomainfrom
fix/361-configurable-detach-key

Conversation

@asheshgoplani
Copy link
Copy Markdown
Owner

Summary

  • Adds detach action to the existing [hotkeys] config system, defaulting to ctrl+q
  • Generalizes IndexCtrlQ into IndexDetachKey that works with any control-key byte (raw + xterm modifyOtherKeys + kitty CSI u encodings)
  • Threads the configured detach byte through Attach/AttachWindow from TUI and CLI callers (variadic parameter, fully backward compatible)

Users whose terminals intercept Ctrl+Q (XON/XOFF flow control in iTerm2, Zellij multiplexer, etc.) can now remap to any ctrl+ key in ~/.agent-deck/config.toml:

[hotkeys]
detach = "ctrl+]"

Fixes #361

Test plan

  • All existing IndexCtrlQ tests pass (wrapper over IndexDetachKey)
  • New TestIndexDetachKey with 16 cases (different keys, encodings, prefixes)
  • New TestDetachByteFromBinding with 14 cases
  • New TestDetachByteLabel with 10 cases
  • New TestResolvedDetachByte with 5 cases
  • golangci-lint run passes
  • Full go test -race ./... passes

Add "detach" action to the hotkey system (default: ctrl+q) so users
whose terminals intercept Ctrl+Q (XON/XOFF flow control, Zellij, etc.)
can remap to a key that passes through.

- Generalize IndexCtrlQ into IndexDetachKey that works with any
  control-key byte and its xterm/kitty escape-sequence encodings
- Keep IndexCtrlQ as a backward-compatible wrapper
- Thread the configured detach byte through Attach/AttachWindow (variadic,
  backward compatible) from TUI and CLI callers
- Show the configured key label in `session attach` usage text

Committed by Ashesh Goplani
@asheshgoplani asheshgoplani merged commit bfcd160 into main Mar 18, 2026
1 check passed
@valivishy
Copy link
Copy Markdown

Hi @asheshgoplani 👋

I really like your product and appreciate you guys being so responsive to fix this.
I needed only 10 minutes with agent-deck to know it will stay with me for a long time. I've already built personal workflows around your tool.

Keep up the wonderful work,
May you have beautiful days 🌻

Valentin.

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.

Ctrl+Q detach not working (iTerm2 / macOS) — XON/XOFF flow control not cleared on attach PTY

2 participants