Skip to content

fix(tmux): forward nav keys directly to mux pane on Windows psmux#262

Open
john-mutuma wants to merge 1 commit intofolke:mainfrom
john-mutuma:fix/windows-tmux-nav-passthrough
Open

fix(tmux): forward nav keys directly to mux pane on Windows psmux#262
john-mutuma wants to merge 1 commit intofolke:mainfrom
john-mutuma:fix/windows-tmux-nav-passthrough

Conversation

@john-mutuma
Copy link
Copy Markdown

@john-mutuma john-mutuma commented Mar 3, 2026

Summary

On Windows with psmux, control keys like C-j passed through Neovim's terminal emulation get mangled — C-j (newline) becomes CR (submit). This PR fixes the issue by routing nav key passthrough directly through tmux send-keys when a mux parent is available, bypassing the terminal translation layer entirely.

Changes

  • lua/sidekick/cli/session/tmux.lua: Add send_key() method that sends raw keys via tmux send-keys targeting by session name.
  • lua/sidekick/cli/actions.lua: In the nav() passthrough case (at edge or float), detect mux parent with send_key support and route the key directly to the mux pane instead of returning it as an expr string.

Testing

Manually tested on Windows with psmux: <C-j> now correctly inserts a newline in CLI tool prompts instead of submitting.

@github-actions github-actions Bot added the size/m Medium PR (<50 lines changed) label Mar 3, 2026
@john-mutuma john-mutuma changed the title fix(tmux): forward nav keys directly to mux pane on Windows (psmux) fix(tmux): forward nav keys directly to mux pane on Windows psmux Mar 3, 2026
@john-mutuma john-mutuma force-pushed the fix/windows-tmux-nav-passthrough branch 2 times, most recently from 4cb1bc3 to 3cabaf1 Compare March 3, 2026 15:07
@john-mutuma john-mutuma force-pushed the fix/windows-tmux-nav-passthrough branch from 3cabaf1 to 696c14c Compare March 3, 2026 15:14
@john-mutuma john-mutuma closed this Mar 3, 2026
@john-mutuma john-mutuma deleted the fix/windows-tmux-nav-passthrough branch March 3, 2026 18:44
@john-mutuma john-mutuma restored the fix/windows-tmux-nav-passthrough branch March 3, 2026 18:46
@john-mutuma john-mutuma reopened this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m Medium PR (<50 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant