This commit partially reverts d465a47
and introduces an alternative approach by adding Hash and Equals methods to the KeyChords class. Those methods will now favor any existing Vkeys over ScanCodes.
## PR Checklist
* [x] Closes #10933
* [x] I work here
* [x] Tests added/passed
## Validation Steps Performed
* Added a new test, which is ✔️
* Various standard commands still work ✔️
* Hash() returns the same value for all KeyChords that are Equals() ✔️
21 lines
575 B
Plaintext
21 lines
575 B
Plaintext
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
namespace Microsoft.Terminal.Control
|
|
{
|
|
[default_interface]
|
|
runtimeclass KeyChord
|
|
{
|
|
KeyChord();
|
|
KeyChord(Windows.System.VirtualKeyModifiers modifiers, Int32 vkey, Int32 scanCode);
|
|
KeyChord(Boolean ctrl, Boolean alt, Boolean shift, Boolean win, Int32 vkey, Int32 scanCode);
|
|
|
|
UInt64 Hash();
|
|
Boolean Equals(KeyChord other);
|
|
|
|
Windows.System.VirtualKeyModifiers Modifiers;
|
|
Int32 Vkey;
|
|
Int32 ScanCode;
|
|
}
|
|
}
|