[PR #9854] [MERGED] Add globalSummon action #27792

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9854
Author: @zadjii-msft
Created: 4/16/2021
Status: Merged
Merged: 4/28/2021
Merged by: @DHowett

Base: mainHead: dev/migrie/f/653-QUAKE-MODE


📝 Commits (10+)

  • 3bef7bb Get all the projects created and hooked up to the sln
  • 1f52d35 Yank all the M/P files, this builds?!
  • 5a9cdc8 Shockingly, this works, it works elevated, and it works unpackaged
  • 36539cf This won't work, but I'm committing this becaus I finally got it to compile a String[]
  • 27ace16 whoop, we pass the commandline from the peasant, to the monarch, and then back!
  • 9a41647 HOLY SHIT I GOT THE COMANDLINE TO EXECUTE IN THE CURRENT WINDOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • 5cabcfb add a note to future me
  • 03bfc6e This works as a unittest, but not a local test. That's batty
  • 590b9ff this macro makes me feel dirty
  • 0579b24 LocalTests_Remoting -> UnitTests_Remoting

📊 Changes

35 files changed (+903 additions, -39 deletions)

View changed files

📝 .github/actions/spelling/dictionary/apis.txt (+1 -0)
📝 src/cascadia/Remoting/Microsoft.Terminal.RemotingLib.vcxproj (+6 -0)
📝 src/cascadia/Remoting/Monarch.cpp (+48 -1)
📝 src/cascadia/Remoting/Monarch.h (+1 -0)
📝 src/cascadia/Remoting/Monarch.idl (+12 -0)
📝 src/cascadia/Remoting/Peasant.cpp (+19 -0)
📝 src/cascadia/Remoting/Peasant.h (+3 -0)
📝 src/cascadia/Remoting/Peasant.idl (+5 -2)
src/cascadia/Remoting/SummonWindowSelectionArgs.cpp (+5 -0)
src/cascadia/Remoting/SummonWindowSelectionArgs.h (+40 -0)
📝 src/cascadia/Remoting/WindowManager.cpp (+16 -0)
📝 src/cascadia/Remoting/WindowManager.h (+3 -0)
📝 src/cascadia/Remoting/WindowManager.idl (+3 -0)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+19 -0)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+8 -1)
📝 src/cascadia/TerminalApp/AppLogic.h (+3 -0)
📝 src/cascadia/TerminalApp/AppLogic.idl (+3 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+1 -2)
📝 src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp (+8 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.cpp (+16 -0)

...and 15 more files

📄 Description

Summary of the Pull Request

Adds support for two new actions:

  • globalSummon, which can be used to activate a window using a global (READ: OS-level) hotkey.
    • accepts an optional name argument. When provided, this will attempt to summon with the given name. When omitted, we'll try to summon the most recent window.
  • quakeMode which is globalSummon for the _quake window.

These actions are stored in the actions array, but are read by the WindowsTerminal level and bound to the OS in IslandWindow. The monarch registers for these keybindings with the OS. When one is pressed, the monarch will recieve a WM_HOTKEY message. It'll use that to look up the corresponding action args. It'll use those to try and simmon the right window.

References

  • #8888: Quake mode megathread
  • #9274: Spec (guys seriously i just need one more ✔️)
  • #9785: The start of granting "_quake" super powers

PR Checklist

Detailed Description of the Pull Request / Additional comments

I'd love to post screenshots and gifs of this all over twitter, but hey that's frowned upon

Validation Steps Performed

  • Validated that it works with win keys
  • Validated that it works without win keys
  • Validated that it hot-reloads
  • Validated that it moves to the new monarch
  • Validated that you can bind both globalSummon and quakeMode at the same time and do different things
  • Validated that you can bind globalSummon with a name and it creates that name if it doesn't already exist

🔄 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/9854 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 4/16/2021 **Status:** ✅ Merged **Merged:** 4/28/2021 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/migrie/f/653-QUAKE-MODE` --- ### 📝 Commits (10+) - [`3bef7bb`](https://github.com/microsoft/terminal/commit/3bef7bbb389f7b048983bac8dda32af0e662a9fb) Get all the projects created and hooked up to the sln - [`1f52d35`](https://github.com/microsoft/terminal/commit/1f52d3583390e300b8253d605b5f79adac5e921b) Yank all the M/P files, this builds?! - [`5a9cdc8`](https://github.com/microsoft/terminal/commit/5a9cdc8b0bfda790a70368d8381559628eba554f) Shockingly, this works, it works elevated, and it works unpackaged - [`36539cf`](https://github.com/microsoft/terminal/commit/36539cfa47d1b5f3a3b0bf44f7bdcb057aa08e95) This won't work, but I'm committing this becaus I finally got it to compile a String[] - [`27ace16`](https://github.com/microsoft/terminal/commit/27ace166529367171fc81cef12aa4812e6ff8e13) whoop, we pass the commandline from the peasant, to the monarch, and then back! - [`9a41647`](https://github.com/microsoft/terminal/commit/9a41647ffe00d973f11478fb937221239d6ac81a) HOLY SHIT I GOT THE COMANDLINE TO EXECUTE IN THE CURRENT WINDOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - [`5cabcfb`](https://github.com/microsoft/terminal/commit/5cabcfb45229f686d424c6d5a2fdfca7dd446639) add a note to future me - [`03bfc6e`](https://github.com/microsoft/terminal/commit/03bfc6e8a93c901ef00b34310c4e1c313019e720) This works as a unittest, but not a local test. That's batty - [`590b9ff`](https://github.com/microsoft/terminal/commit/590b9ff0c73487720a110213c4b19a2f4a00be8e) this macro makes me feel dirty - [`0579b24`](https://github.com/microsoft/terminal/commit/0579b2417bcdd74814ea05d7eb64723542584764) LocalTests_Remoting -> UnitTests_Remoting ### 📊 Changes **35 files changed** (+903 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/dictionary/apis.txt` (+1 -0) 📝 `src/cascadia/Remoting/Microsoft.Terminal.RemotingLib.vcxproj` (+6 -0) 📝 `src/cascadia/Remoting/Monarch.cpp` (+48 -1) 📝 `src/cascadia/Remoting/Monarch.h` (+1 -0) 📝 `src/cascadia/Remoting/Monarch.idl` (+12 -0) 📝 `src/cascadia/Remoting/Peasant.cpp` (+19 -0) 📝 `src/cascadia/Remoting/Peasant.h` (+3 -0) 📝 `src/cascadia/Remoting/Peasant.idl` (+5 -2) ➕ `src/cascadia/Remoting/SummonWindowSelectionArgs.cpp` (+5 -0) ➕ `src/cascadia/Remoting/SummonWindowSelectionArgs.h` (+40 -0) 📝 `src/cascadia/Remoting/WindowManager.cpp` (+16 -0) 📝 `src/cascadia/Remoting/WindowManager.h` (+3 -0) 📝 `src/cascadia/Remoting/WindowManager.idl` (+3 -0) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+19 -0) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+8 -1) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+3 -0) 📝 `src/cascadia/TerminalApp/AppLogic.idl` (+3 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+1 -2) 📝 `src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp` (+8 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.cpp` (+16 -0) _...and 15 more files_ </details> ### 📄 Description ## Summary of the Pull Request Adds support for two new actions: * `globalSummon`, which can be used to activate a window using a _global_ (READ: OS-level) hotkey. - accepts an optional `name` argument. When provided, this will attempt to summon with the given name. When omitted, we'll try to summon the most recent window. * `quakeMode` which is `globalSummon` for the `_quake` window. These actions are stored in the actions array, but are read by the `WindowsTerminal` level and bound to the OS in `IslandWindow`. The monarch registers for these keybindings with the OS. When one is pressed, the monarch will recieve a `WM_HOTKEY` message. It'll use that to look up the corresponding action args. It'll use those to try and simmon the right window. ## References * #8888: Quake mode megathread * #9274: Spec (**guys seriously i just need one more ✔️**) * #9785: The start of granting "\_quake" super powers ## PR Checklist * [x] Closes #653 - I'm gonna say this closes it for now, though we have _many_ follow-ups in #8888 * [x] I work here * [x] Tests added/passed * [ ] Requires documentation to be updated - I'm explicitly not adding docs until this is more rounded out at the end of 1.9, because this area's going to get a lot of churn ## Detailed Description of the Pull Request / Additional comments I'd love to post screenshots and gifs of this all over twitter, but hey that's frowned upon ## Validation Steps Performed * Validated that it works with `win` keys * Validated that it works without `win` keys * Validated that it hot-reloads * Validated that it moves to the new monarch * Validated that you can bind both `globalSummon` and `quakeMode` at the same time and do different things * Validated that you can bind `globalSummon` with a name and it creates that name if it doesn't already exist --- <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:24:16 +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#27792