Skip to content

fix(tmux): move clear macro off C-k to C-/ so apps get Ctrl+K#316

Closed
drn wants to merge 1 commit into
masterfrom
argus/2026-06-12-204642-tmux-clear
Closed

fix(tmux): move clear macro off C-k to C-/ so apps get Ctrl+K#316
drn wants to merge 1 commit into
masterfrom
argus/2026-06-12-204642-tmux-clear

Conversation

@drn

@drn drn commented Jun 13, 2026

Copy link
Copy Markdown
Owner

What

bind -n C-k in home/tmux.conf was swallowing Ctrl+K at the tmux root key table and rewriting it to Ctrl+L before any TUI app could see it — which broke the argus task switcher (and any other app that wants Ctrl+K).

This moves the clear-screen + clear-history macro off Ctrl+K onto Ctrl+/, bound as both C-/ and C-_ to cover the two ways terminals encode Ctrl+/. Ctrl+K now passes straight through to the running program.

# clear window binding (C-/ ; bind both encodings since terminals send C-/ or C-_)
bind -n C-/ send-keys C-l \; run-shell "sleep 0.3" \; clear-history
bind -n C-_ send-keys C-l \; run-shell "sleep 0.3" \; clear-history

Why on master

This change was already live in the running tmux server and committed to the root branch of the main checkout, but root is a stale shadow of master and this is the only genuinely new commit on it. Landing it here puts it on the primary branch.

Verification note

If your terminal uses the Kitty keyboard protocol (ghostty, kitty, recent WezTerm/foot), Ctrl+/ may arrive as a CSI-u sequence that neither C-/ nor C-_ catches — confirm Ctrl+/ actually clears, and switch to a plain Ctrl+letter if not.

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

bind -n C-k was swallowing Ctrl+K at the tmux root table, rewriting it
to Ctrl+L before TUI apps (e.g. the argus task switcher) could see it.
Move the clear-screen+history macro to Ctrl+/, bound as both C-/ and
C-_ to cover terminal encoding variants. Ctrl+K now passes through to
the running program.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@drn

drn commented Jun 13, 2026

Copy link
Copy Markdown
Owner Author

Superseded: the tmux clear-macro rebind already landed on master (commit e4b8737, after a history-rewrite that scrubbed an unrelated 20MB bin/hera binary and a broken absolute-path symlink bundled into the original direct push). Closing as redundant.

@drn drn closed this Jun 13, 2026
@drn drn deleted the argus/2026-06-12-204642-tmux-clear branch June 13, 2026 06:43
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