[PR #9222] [CLOSED] [PoC] Allow broadcasting keys to all panes in tab #27473

Open
opened 2026-01-31 09:22:10 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9222
Author: @Don-Vito
Created: 2/19/2021
Status: Closed

Base: mainHead: 2634-broadcast-attempt1


📝 Commits (6)

  • 03d3323 Introduce Pane broadcast
  • f77a69d Introduce Char broadcast
  • 32c98f5 Add ToggleInputBroadcast command
  • 38ca587 Avoid broadcasting to read-only panes
  • 4612901 Introduce color-coding of read-only and broad-casting panes
  • 6b961aa Merge remote-tracking branch 'upstream/main' into 2634-broadcast-attempt1

📊 Changes

22 files changed (+311 additions, -10 deletions)

View changed files

📝 src/cascadia/TerminalApp/App.xaml (+4 -0)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+11 -0)
📝 src/cascadia/TerminalApp/CommandPalette.xaml (+7 -0)
📝 src/cascadia/TerminalApp/Pane.cpp (+110 -2)
📝 src/cascadia/TerminalApp/Pane.h (+11 -0)
📝 src/cascadia/TerminalApp/ShortcutActionDispatch.cpp (+5 -0)
📝 src/cascadia/TerminalApp/ShortcutActionDispatch.h (+1 -0)
📝 src/cascadia/TerminalApp/ShortcutActionDispatch.idl (+1 -0)
📝 src/cascadia/TerminalApp/TabHeaderControl.xaml (+6 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+1 -0)
📝 src/cascadia/TerminalApp/TerminalPage.h (+1 -0)
📝 src/cascadia/TerminalApp/TerminalTab.cpp (+34 -1)
📝 src/cascadia/TerminalApp/TerminalTab.h (+2 -0)
📝 src/cascadia/TerminalApp/TerminalTabStatus.h (+1 -0)
📝 src/cascadia/TerminalApp/TerminalTabStatus.idl (+1 -0)
📝 src/cascadia/TerminalControl/TermControl.cpp (+39 -6)
📝 src/cascadia/TerminalControl/TermControl.h (+48 -0)
📝 src/cascadia/TerminalControl/TermControl.idl (+19 -0)
📝 src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp (+3 -0)
📝 src/cascadia/TerminalSettingsModel/KeyMapping.idl (+2 -1)

...and 2 more files

📄 Description

Summary of the Pull Request

Introduces ToggleInputBroadcast command,
that makes Terminal Tab to broadcast its input to all panes.

This is an early draft to see if the implementation
and UX make any sense at all.

References

This is an attempt to address #2634.

PR Checklist

  • CLA signed.
  • Tests added/passed
  • Documentation updated.
  • Schema updated.
  • I've discussed this with core contributors already.

Detailed Description of the Pull Request / Additional comments

  • Store the IsInputBroadcastActive flag on the tab level
  • Add KeySent and CharSent events to TermControl
  • Register on this events in Tab and send the keys / chars
    to other terminals if IsInputBroadcastActive

One of the dilemmas was were to hook the input.
The most robust way would be to do it upon SendInputToConnection.
But it will prevent auto scrolling and deselection.

TODO

  • Fix the cursor blinking
  • Use accent colors for color coding

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/9222 **Author:** [@Don-Vito](https://github.com/Don-Vito) **Created:** 2/19/2021 **Status:** ❌ Closed **Base:** `main` ← **Head:** `2634-broadcast-attempt1` --- ### 📝 Commits (6) - [`03d3323`](https://github.com/microsoft/terminal/commit/03d33234d06b9968accc09c6d6ee4d8060522247) Introduce Pane broadcast - [`f77a69d`](https://github.com/microsoft/terminal/commit/f77a69d409f93495b9d01581a5291bc6cc5bf894) Introduce Char broadcast - [`32c98f5`](https://github.com/microsoft/terminal/commit/32c98f5664fea595166e17dc58f1a5dc6418c237) Add ToggleInputBroadcast command - [`38ca587`](https://github.com/microsoft/terminal/commit/38ca58705a6df4149b7447ba17f42919add81d10) Avoid broadcasting to read-only panes - [`4612901`](https://github.com/microsoft/terminal/commit/4612901d94bda1fb8e4df116bf2ed442cf858234) Introduce color-coding of read-only and broad-casting panes - [`6b961aa`](https://github.com/microsoft/terminal/commit/6b961aae8aa5d55042666dac0f164cbb31c2d0c2) Merge remote-tracking branch 'upstream/main' into 2634-broadcast-attempt1 ### 📊 Changes **22 files changed** (+311 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/App.xaml` (+4 -0) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+11 -0) 📝 `src/cascadia/TerminalApp/CommandPalette.xaml` (+7 -0) 📝 `src/cascadia/TerminalApp/Pane.cpp` (+110 -2) 📝 `src/cascadia/TerminalApp/Pane.h` (+11 -0) 📝 `src/cascadia/TerminalApp/ShortcutActionDispatch.cpp` (+5 -0) 📝 `src/cascadia/TerminalApp/ShortcutActionDispatch.h` (+1 -0) 📝 `src/cascadia/TerminalApp/ShortcutActionDispatch.idl` (+1 -0) 📝 `src/cascadia/TerminalApp/TabHeaderControl.xaml` (+6 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+1 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+1 -0) 📝 `src/cascadia/TerminalApp/TerminalTab.cpp` (+34 -1) 📝 `src/cascadia/TerminalApp/TerminalTab.h` (+2 -0) 📝 `src/cascadia/TerminalApp/TerminalTabStatus.h` (+1 -0) 📝 `src/cascadia/TerminalApp/TerminalTabStatus.idl` (+1 -0) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+39 -6) 📝 `src/cascadia/TerminalControl/TermControl.h` (+48 -0) 📝 `src/cascadia/TerminalControl/TermControl.idl` (+19 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp` (+3 -0) 📝 `src/cascadia/TerminalSettingsModel/KeyMapping.idl` (+2 -1) _...and 2 more files_ </details> ### 📄 Description ## Summary of the Pull Request Introduces ToggleInputBroadcast command, that makes Terminal Tab to broadcast its input to all panes. This is an early draft to see if the implementation and UX make any sense at all. ## References This is an attempt to address #2634. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] CLA signed. * [ ] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [ ] I've discussed this with core contributors already. <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments * Store the IsInputBroadcastActive flag on the tab level * Add KeySent and CharSent events to TermControl * Register on this events in Tab and send the keys / chars to other terminals if IsInputBroadcastActive One of the dilemmas was were to hook the input. The most robust way would be to do it upon SendInputToConnection. But it will prevent auto scrolling and deselection. TODO * [ ] Fix the cursor blinking * [ ] Use accent colors for color coding --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:22:10 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27473