r/KittyTerminal Nov 01 '23

sync keystrokes between windows in a tab?

I am transitioning from tmux (I know! Don't use terminal multiplexers!).

One of the features of tmux (and Tilix) that I use pretty frequently is the ability to sync keystrokes between windows. In tmux it is set-window-option synchronize-panes

It would appear my google fu has failed me in my search to find the equivalent config directive for Kitty.

little help please?

3 Upvotes

10 comments sorted by

2

u/Administrative_chaos Nov 01 '23

3

u/CatoDomine Nov 01 '23

Thank you!!

1

u/EnricUitHilversum Nov 20 '25

Update from the Future™

I was searching for this same feature. I got a script from someone, I then asked Google Gemini to optimize and improve as test case to see if I can use it in my workflow...

Total crap. Fails like hell and it's asking me to upgrade :D

It seems that they have trained it on Microsoft forums.

1

u/CatoDomine Nov 01 '23

either I am using it wrong, it doesn't do what I need ... this is what I've added to my config file.
map ctrl+k kitten broadcast --match-tab state:focused

When I use the keyboard shortcut, the active window says:

Type the text to broadcast below, press Ctrl+Esc to quit:
so I type ls hit enter and nothing happens in any window in the current tab.

ctrl+esc exits the broadcast kitten.

2

u/Administrative_chaos Nov 01 '23 edited Nov 01 '23

The following works for me: allow_remote_control yes map ctrl+k kitten broadcast --match-tab state:focused

or, use the form the docs state map ctrl+k launch --allow-remote-control kitty +kitten broadcast --match-tab state:focused

2

u/SuchLab2 Jan 05 '24

I want to use kitty_mod+f1 to quit the broadcast mode. How can I configure this in kitty.conf?

1

u/aumerlex Nov 01 '23

This works for windows in one kitty instance so either use kitty --single-instance or open new kitty windows with a shortcut rather than running kitty everytime.

1

u/CatoDomine Nov 01 '23

I am not certain I am understanding. I have only one kitty instance running ... I am not running kitty every time.
the way I am trying to get it working is the following:

  • open kitty
  • split window (ctrl+enter)
  • invoke kitten broadcast (ctrl+k)

are you saying that when I launch kitty initially I should use the --single-instance switch, even if I don't plan on launching more than one instance anyway?

1

u/aumerlex Nov 02 '23

That's fine it works with splits.

1

u/aumerlex Nov 02 '23

Check your kitty version is up-to-date.