/ src / modules / keyboardmanager / KeyboardManagerEditorLibrary / BufferValidationHelpers.h
BufferValidationHelpers.h
 1  #pragma once
 2  
 3  #include <keyboardmanager/common/Helpers.h>
 4  
 5  #include "ShortcutErrorType.h"
 6  
 7  namespace BufferValidationHelpers
 8  {
 9      enum class DropDownAction
10      {
11          NoAction,
12          AddDropDown,
13          DeleteDropDown,
14          ClearUnusedDropDowns
15      };
16  
17      // Helper function to verify if a key is being remapped to/from its combined key
18      bool IsKeyRemappingToItsCombinedKey(DWORD keyCode1, DWORD keyCode2);
19  
20      // Function to validate and update an element of the key remap buffer when the selection has changed
21      ShortcutErrorType ValidateAndUpdateKeyBufferElement(int rowIndex, int colIndex, int selectedKeyCode, RemapBuffer& remapBuffer);
22  
23      // Function to validate an element of the shortcut remap buffer when the selection has changed
24      std::pair<ShortcutErrorType, DropDownAction> ValidateShortcutBufferElement(int rowIndex, int colIndex, uint32_t dropDownIndex, const std::vector<int32_t>& selectedCodes, std::wstring appName, bool isHybridControl, const RemapBuffer& remapBuffer, bool dropDownFound);
25  }