EditorHelpers.h
 1  #pragma once
 2  #include <keyboardmanager/common/Shortcut.h>
 3  
 4  #include "ShortcutErrorType.h"
 5  
 6  namespace EditorHelpers
 7  {
 8      // Function to check if two keys are equal or cover the same set of keys. Return value depends on type of overlap
 9      ShortcutErrorType DoKeysOverlap(DWORD first, DWORD second);
10  
11      // Function to check if a modifier has been repeated in the previous drop downs
12      bool CheckRepeatedModifier(const std::vector<int32_t>& currentKeys, int selectedKeyCodes);
13  
14      // Function to return true if the shortcut is valid. A valid shortcut has at least one modifier, as well as an action key
15      bool IsValidShortcut(Shortcut shortcut);
16  
17      // Function to check if the two shortcuts are equal or cover the same set of keys. Return value depends on type of overlap
18      ShortcutErrorType DoShortcutsOverlap(const Shortcut& first, const Shortcut& second);
19  
20      // Function to return a vector of hstring for each key in the display order
21      std::vector<winrt::hstring> GetKeyVector(Shortcut shortcut, LayoutMap& keyboardMap);
22  
23      // Function to check if the shortcut is illegal (i.e. Win+L or Ctrl+Alt+Del)
24      ShortcutErrorType IsShortcutIllegal(Shortcut shortcut);
25  }