feat: Broadcasting input to all surfaces in a split/tab/window #11797
Unanswered
kuroa-me
asked this question in
Vouch Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What do you want to change?
There is an existing discussion #3227 about broadcasting behavior like iTerm2 (locked for spamming), also #3959 #7086 dups, I would like to implement that.
There is a PR #10531 (closed for missing a linking issue) tried to implement it, but it simply broadcasts to all surfaces in the app, which might not be the desired behavior. Also lacks any indications.
I would like to discuss detailed implementation in a feature request discussion thread, but I will share my current working impl here to increase my chance of passing the vouch.
PoC macOS only here. You will be able to toggle the broadcast input to: window, tab, surface. Use command palette to invoke "Broadcast Input" or set your own keybind
keybind = super+shift+i=broadcast_input:current_tab. (No more ctrl+opt+shift+⌘+I for iterm2 toggle, yay)Details
The core broadcasting will behaves like #10531, but differs in the surface selection phase. Just like iTerm2, the impl will support multiple domains, but limit one domain per window. Encoded text will be broadcasted within the domain.
Since the underlying zig part does only have scope of
appandsurface. A new unique identifierbroadcast_domainis added to surface, and onkeyCallbacksurface willqueueIOto all the surfaces that have the samebroadcast_domainwith the focused surface.apprt, in my case macOS swift, will be the one who is settingbroadcast_domainto the surfaces. Since only runtime will know the actual arrangement of the surfaces. A new optional action and some CAPI are added to support this.I also added a broadcast budge just like read-only budge, and discovered some funky interactions with read-only mode in the way, but will left this to the feature request discussion if possible.
Why do you want to make this change?
I need the broadcast feature from iTerm2, this is the only thing keeping me from using ghostty, and I would like to switch to ghostty completely.
I acknowledge that:
Beta Was this translation helpful? Give feedback.
All reactions