Send Input to a tmux Pane

Find the target pane's ID, using one of the following methods:

  • Ctrl+b, :display '#{pane_id}'
  • tmux run 'echo #{pane_id}'
tmux send -t '${pane_id}' "${keys}"

There can be multiple ${keys} arguments.

  • If a key argument is recognised as a key name, then that will be sent.
    • Use -l to disable this and send the text literally.
  • Values such as C-c are interpreted as Ctrl+C.
    • Use C-j for Return.
  • Values such as Escape are interpreted as ESC.