/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/keyboardmanager/KeyboardManagerEditor/KeyboardManagerEditor.h
42 строки
1 KB
Jeff Lord
[KBM]Launch apps / URI with keyboard shortcuts, support chords (#30121)
28 фев 2024, 02:12
Не верифицирован
28 фев 2024, 02:12
725c8e8
Код
Авторство
О чём код?
#pragma once #include <keyboardmanager/common/Input.h> #include <keyboardmanager/common/MappingConfiguration.h> #include <KeyboardManagerState.h> enum class KeyboardManagerEditorType { KeyEditor = 0, ShortcutEditor, }; class KeyboardManagerEditor { public: KeyboardManagerEditor(HINSTANCE hInstance); ~KeyboardManagerEditor(); KeyboardManagerInput::Input& GetInputHandler() noexcept { return inputHandler; } bool StartLowLevelKeyboardHook(); void OpenEditorWindow(KeyboardManagerEditorType type, std::wstring keysForShortcutToEdit, std::wstring action); // Function called by the hook procedure to handle the events. This is the starting point function for remapping intptr_t HandleKeyboardHookEvent(LowlevelKeyboardEvent* data) noexcept; private: static LRESULT CALLBACK KeyHookProc(int nCode, WPARAM wParam, LPARAM lParam); inline static HHOOK hook; HINSTANCE hInstance; KBMEditor::KeyboardManagerState keyboardManagerState; MappingConfiguration mappingConfiguration; // Object of class which implements InputInterface. Required for calling library functions while enabling testing KeyboardManagerInput::Input inputHandler; };