/ src / modules / keyboardmanager / KeyboardManagerEditorLibrary / LoadingAndSavingRemappingHelper.h
LoadingAndSavingRemappingHelper.h
1 #pragma once 2 3 #include <keyboardmanager/common/Helpers.h> 4 5 #include "ShortcutErrorType.h" 6 7 class MappingConfiguration; 8 9 namespace LoadingAndSavingRemappingHelper 10 { 11 // Function to check if the set of remappings in the buffer are valid 12 ShortcutErrorType CheckIfRemappingsAreValid(const RemapBuffer& remappings); 13 14 // Function to return the set of keys that have been orphaned from the remap buffer 15 std::vector<DWORD> GetOrphanedKeys(const RemapBuffer& remappings); 16 17 // Function to combine remappings if the L and R version of the modifier is mapped to the same key 18 void CombineRemappings(std::unordered_map<DWORD, KeyShortcutTextUnion>& table, DWORD leftKey, DWORD rightKey, DWORD combinedKey); 19 20 // Function to pre process the remap table before loading it into the UI 21 void PreProcessRemapTable(std::unordered_map<DWORD, KeyShortcutTextUnion>& table); 22 23 // Function to apply the single key remappings from the buffer to the KeyboardManagerState variable 24 void ApplySingleKeyRemappings(MappingConfiguration& mappingConfiguration, const RemapBuffer& remappings, bool isTelemetryRequired); 25 26 // Function to apply the shortcut remappings from the buffer to the KeyboardManagerState variable 27 void ApplyShortcutRemappings(MappingConfiguration& mappingConfiguration, const RemapBuffer& remappings, bool isTelemetryRequired); 28 }