Problem
action.send_keys() has a hardcoded Enter at the end:
-- lua/wiremux/backend/tmux/action.lua
function M.send_keys(target_id, keys)
return { "send-keys", "-t", target_id, keys, "Enter" }
end
We can't send arbitrary keystrokes - for example when client running in the target requires sending non-typical key combination (e.g. Ctrl+Enter) for submition or any other purpose.
The function name suggests a general-purpose key sender, but it's actually "type text and press Enter". This is misleading and makes the function unusable for sending arbitrary keystrokes.
Suggestion
Make send_keys a clean low-level primitive — accept string|string[], don't append anything:
function M.send_keys(target_id, keys)
local cmd = { "send-keys", "-t", target_id }
if type(keys) == "table" then
vim.list_extend(cmd, keys)
else
table.insert(cmd, keys)
end
return cmd
end
Then fix callers to be explicit:
-- submit: explicitly send Enter
action.send_keys(t.id, "Enter")
-- create with shell cmd: explicitly send cmd + Enter
action.send_keys(id, { cmd, "Enter" })
This is a small, non-breaking internal refactor. No public API changes. The behavior stays the same, the code just says what it means.
Problem
action.send_keys()has a hardcodedEnterat the end:We can't send arbitrary keystrokes - for example when client running in the target requires sending non-typical key combination (e.g. Ctrl+Enter) for submition or any other purpose.
The function name suggests a general-purpose key sender, but it's actually "type text and press Enter". This is misleading and makes the function unusable for sending arbitrary keystrokes.
Suggestion
Make
send_keysa clean low-level primitive — acceptstring|string[], don't append anything:Then fix callers to be explicit:
This is a small, non-breaking internal refactor. No public API changes. The behavior stays the same, the code just says what it means.