17e68a09a8
Replaces `KeyModifiers` with the pretty much equivalent `VirtualKeyModifiers` enum in winrt. After doing this I noticed #10593 which changes the KeyChords a lot, but it seems these PRs are still compatible The issue also mentions replacing Vkey with `Windows::System::VirtualKey`, but I chose not to because that enum only includes a subset of the keys terminal supports here (no VK_OEM_* keys) ## Validation Steps Performed Changed key bind in config, and confirmed it still works after restarting terminal Closes #877
34 lines
1 KiB
C++
34 lines
1 KiB
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
#pragma once
|
|
|
|
#include "KeyChord.g.h"
|
|
|
|
namespace winrt::Microsoft::Terminal::Control::implementation
|
|
{
|
|
struct KeyChord : KeyChordT<KeyChord>
|
|
{
|
|
KeyChord() noexcept;
|
|
KeyChord(winrt::Windows::System::VirtualKeyModifiers const& modifiers, int32_t vkey) noexcept;
|
|
KeyChord(bool ctrl, bool alt, bool shift, int32_t vkey) noexcept;
|
|
KeyChord(bool ctrl, bool alt, bool shift, bool win, int32_t vkey) noexcept;
|
|
|
|
winrt::Windows::System::VirtualKeyModifiers Modifiers() noexcept;
|
|
void Modifiers(winrt::Windows::System::VirtualKeyModifiers const& value) noexcept;
|
|
int32_t Vkey() noexcept;
|
|
void Vkey(int32_t value) noexcept;
|
|
|
|
private:
|
|
winrt::Windows::System::VirtualKeyModifiers _modifiers;
|
|
int32_t _vkey;
|
|
};
|
|
}
|
|
|
|
namespace winrt::Microsoft::Terminal::Control::factory_implementation
|
|
{
|
|
struct KeyChord : KeyChordT<KeyChord, implementation::KeyChord>
|
|
{
|
|
};
|
|
}
|