/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/keyboardmanager/KeyboardManagerEditorLibrary/BufferValidationHelpers.h
25 строк
1 KB
Jaime Bernardo
[KBM Editor] fix crash when mapping left and right modifier to the combined key. (#12999)
03 сен 2021, 18:19
Не верифицирован
03 сен 2021, 18:19
b8236d5
Код
Авторство
О чём код?
#pragma once #include <keyboardmanager/common/Helpers.h> #include "ShortcutErrorType.h" namespace BufferValidationHelpers { enum class DropDownAction { NoAction, AddDropDown, DeleteDropDown, ClearUnusedDropDowns }; // Helper function to verify if a key is being remapped to/from its combined key bool IsKeyRemappingToItsCombinedKey(DWORD keyCode1, DWORD keyCode2); // Function to validate and update an element of the key remap buffer when the selection has changed ShortcutErrorType ValidateAndUpdateKeyBufferElement(int rowIndex, int colIndex, int selectedKeyCode, RemapBuffer& remapBuffer); // Function to validate an element of the shortcut remap buffer when the selection has changed 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); }