Display keys in Shorcut modal as buttons (#1996)

* Display keys in Shorcut modal as buttons

* Refactor: rename currentShortcutUI and currentSingleKeyUI

* Change GetKeyVector signature
This commit is contained in:
Tomas Agustin Raies
2020-04-08 14:31:31 -07:00
committed by Udit Singh
parent 52c12731cb
commit 70495d9ce9
6 changed files with 143 additions and 73 deletions

View File

@@ -140,6 +140,9 @@ public:
// Function to return the string representation of the shortcut
winrt::hstring ToHstring() const;
// Function to return a vector of hstring for each key, in the same order as ToHstring()
std::vector<winrt::hstring> GetKeyVector() const;
// Function to check if all the modifiers in the shortcut have been pressed down
bool CheckModifiersKeyboardState() const;
@@ -152,6 +155,9 @@ public:
// Function to return the virtual key code from the name of the key
static DWORD DecodeKey(const std::wstring& keyName);
// Function to create a shortcut object from its string vector representation
static Shortcut CreateShortcut(const std::vector<winrt::hstring>& keys);
// Function to create a shortcut object from its string representation
static Shortcut CreateShortcut(const winrt::hstring& input);
};