More comments
This commit is contained in:
parent
784ec731f8
commit
b20222f2c0
|
@ -138,6 +138,14 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
|||
return keyModifiers;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Build a map of all the globalSummon actions.
|
||||
// - quakeMode actions are included in this, but expanded to the equivalent
|
||||
// set of GlobalSummonArgs
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - a map of KeyChord -> ActionAndArgs containing all globally bindable actions.
|
||||
Windows::Foundation::Collections::IMap<Control::KeyChord, Model::ActionAndArgs> KeyMapping::FetchGlobalHotkeys()
|
||||
{
|
||||
std::unordered_map<Control::KeyChord, Model::ActionAndArgs, KeyChordHash, KeyChordEquality> justGlobals;
|
||||
|
@ -153,7 +161,10 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
|||
// Manually replace the QuakeMode action with a globalSummon
|
||||
// that has the appropriate action args.
|
||||
auto args = winrt::make_self<GlobalSummonArgs>();
|
||||
|
||||
// We want to summon the window with the name "_quake" specifically.
|
||||
args->Name(L"_quake");
|
||||
|
||||
Model::ActionAndArgs actionAndArgs{ ShortcutAction::GlobalSummon, *args };
|
||||
justGlobals[k] = actionAndArgs;
|
||||
}
|
||||
|
|
|
@ -902,6 +902,12 @@ void IslandWindow::_SetIsFullscreen(const bool fullscreenEnabled)
|
|||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Call UnregisterHotKey once for each entry in hotkeyList, to unset all the bound global hotkeys.
|
||||
// Arguments:
|
||||
// - hotkeyList: a list of hotkeys to unbind
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void IslandWindow::UnsetHotkeys(const std::vector<winrt::Microsoft::Terminal::Control::KeyChord>& hotkeyList)
|
||||
{
|
||||
for (int i = 0; i < hotkeyList.size(); i++)
|
||||
|
@ -911,6 +917,15 @@ void IslandWindow::UnsetHotkeys(const std::vector<winrt::Microsoft::Terminal::Co
|
|||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Call RegisterHotKey once for each entry in hotkeyList, to attempt to
|
||||
// register that keybinding as a global hotkey.
|
||||
// - When these keys are pressed, we'll get a WM_HOTKEY message with the payload
|
||||
// containing the index we registered here.
|
||||
// Arguments:
|
||||
// - hotkeyList: a list of hotkeys to bind
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void IslandWindow::SetGlobalHotkeys(const std::vector<winrt::Microsoft::Terminal::Control::KeyChord>& hotkeyList)
|
||||
{
|
||||
int index = 0;
|
||||
|
|
Loading…
Reference in a new issue