/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/keyboardmanager/KeyboardManagerEditorLibrary/EditorHelpers.h
25 строк
1 KB
Josh Soref
Updates for check-spelling v0.0.25 (#40386)
09 июл 2025, 01:16
Не верифицирован
09 июл 2025, 01:16
bf16e10
Код
Авторство
О чём код?
#pragma once #include <keyboardmanager/common/Shortcut.h> #include "ShortcutErrorType.h" namespace EditorHelpers { // Function to check if two keys are equal or cover the same set of keys. Return value depends on type of overlap ShortcutErrorType DoKeysOverlap(DWORD first, DWORD second); // Function to check if a modifier has been repeated in the previous drop downs bool CheckRepeatedModifier(const std::vector<int32_t>& currentKeys, int selectedKeyCodes); // Function to return true if the shortcut is valid. A valid shortcut has at least one modifier, as well as an action key bool IsValidShortcut(Shortcut shortcut); // Function to check if the two shortcuts are equal or cover the same set of keys. Return value depends on type of overlap ShortcutErrorType DoShortcutsOverlap(const Shortcut& first, const Shortcut& second); // Function to return a vector of hstring for each key in the display order std::vector<winrt::hstring> GetKeyVector(Shortcut shortcut, LayoutMap& keyboardMap); // Function to check if the shortcut is illegal (i.e. Win+L or Ctrl+Alt+Del) ShortcutErrorType IsShortcutIllegal(Shortcut shortcut); }