Conversation
…ompile a String[]
…!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
…safely tear it down. It _seems_ like it.
…ndow should be. It just always says 0 for now, but in the future it could actually give us useful info.
(cherry picked from commit 9f9eacb)
carlos-zamora
left a comment
There was a problem hiding this comment.
Approving. Only thing is to create a better localized text when a name is provided.
Hoping this can merge in soon so I can propagate any necessary changes to my ActionMap PR #9621
| // "Summon the Terminal window, name:\"{_Name}\"" | ||
| if (!_Name.empty()) | ||
| { | ||
| ss << L", name: "; | ||
| ss << std::wstring_view(_Name); | ||
| } |
There was a problem hiding this comment.
I know we've gotten away with it before, but "name" isn't really localized. How about Summon the "<Name>" window
There was a problem hiding this comment.
I'm just gonna punt this discussion to the next PR I've got queued up, because it's gonna become a quagmire of
Summon the Terminal window named "Foo" to the current desktop(toCurrent/toCurrent/"Foo")Summon the Terminal window on the current desktop(onCurrent/toCurrent)Summon the Terminal window(toCurrent/toCurrent)Go to the Terminal window(any/toCurrent)Summon the Terminal window named "Foo" to the current desktop, to the current monitorSummon the Terminal window on the current desktop, to the current monitorSummon the Terminal window on the current desktop, on the current monitorSummon the Terminal window on the current monitor, to the current desktop(this one had to change order in English to make sense)
y i k e s
|
Format the code -- DO NOT AUTOMERGE as it will destroy the open branches with stacked PRs. |
can do. Once #9954 is approved, I could just merge top-down lol |
DHowett
left a comment
There was a problem hiding this comment.
Commenting now to see all my comments in one place to decide whether to request/approve.
|
|
||
| FindTargetWindowResult FindTargetWindow(String[] args); | ||
|
|
||
| Windows.Foundation.Collections.IMap<Microsoft.Terminal.Control.KeyChord, Microsoft.Terminal.Settings.Model.ActionAndArgs> GlobalHotkeys(); |
|
|
||
| for (const auto& [k, v] : _keyShortcuts) | ||
| { | ||
| if (v.Action() == ShortcutAction::GlobalSummon) |
There was a problem hiding this comment.
discussion hook: This is crying out for Actions to have Scopes 😉
There was a problem hiding this comment.
if only there was hours in the day to even imagine spec'ing that idea 😋
| <!-- | ||
| Microsoft ResX Schema | ||
| <!-- |
There was a problem hiding this comment.
re-save this file in VS if you edited it with SUBL
| else | ||
| { | ||
| // We should make the window ourselves. | ||
| _createNewTerminalWindow(summonArgs); |
There was a problem hiding this comment.
Worried about the proliferation of blocks of "run wt.exe with these args" code...
|
Okay, my only NAK comment is the postprocessing one. If it's justifiable, I'm okay with it ... but it does put some smarts in the reader rather than the loader. |
|
🎉 Handy links: |

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.nameargument. When provided, this will attempt to summon with the given name. When omitted, we'll try to summon the most recent window.quakeModewhich isglobalSummonfor the_quakewindow.These actions are stored in the actions array, but are read by the
WindowsTerminallevel and bound to the OS inIslandWindow. The monarch registers for these keybindings with the OS. When one is pressed, the monarch will recieve aWM_HOTKEYmessage. It'll use that to look up the corresponding action args. It'll use those to try and simmon the right window.References
_quakespecial #9785: The start of granting "_quake" super powersPR 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
winkeyswinkeysglobalSummonandquakeModeat the same time and do different thingsglobalSummonwith a name and it creates that name if it doesn't already exist