mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
- remove common lib - split settings, remove common-md - move ipc interop/kb_layout to interop - rename core -> settings, settings -> old_settings - os-detect header-only; interop -> PowerToysInterop - split notifications, move single-use headers where they're used - winstore lib - rename com utils - rename Updating and Telemetry projects - rename core -> settings-ui and remove examples folder - rename settings-ui folder + consisent common/version include
39 lines
2.0 KiB
C++
39 lines
2.0 KiB
C++
#pragma once
|
|
#include <map>
|
|
#include <mutex>
|
|
#include "keyboardmanager/common/KeyboardManagerConstants.h"
|
|
|
|
#include <common/hooks/LowlevelKeyboardEvent.h>
|
|
|
|
class InputInterface;
|
|
class KeyboardManagerState;
|
|
class Shortcut;
|
|
class RemapShortcut;
|
|
|
|
namespace KeyboardEventHandlers
|
|
{
|
|
// Function to a handle a single key remap
|
|
__declspec(dllexport) intptr_t HandleSingleKeyRemapEvent(InputInterface& ii, LowlevelKeyboardEvent* data, KeyboardManagerState& keyboardManagerState) noexcept;
|
|
|
|
/* This feature has not been enabled (code from proof of concept stage)
|
|
*
|
|
// Function to a change a key's behavior from toggle to modifier
|
|
__declspec(dllexport) intptr_t HandleSingleKeyToggleToModEvent(InputInterface& ii, LowlevelKeyboardEvent* data, KeyboardManagerState& keyboardManagerState) noexcept;
|
|
*/
|
|
|
|
// Function to a handle a shortcut remap
|
|
__declspec(dllexport) intptr_t HandleShortcutRemapEvent(InputInterface& ii, LowlevelKeyboardEvent* data, KeyboardManagerState& keyboardManagerState, const std::optional<std::wstring>& activatedApp = std::nullopt) noexcept;
|
|
|
|
// Function to a handle an os-level shortcut remap
|
|
__declspec(dllexport) intptr_t HandleOSLevelShortcutRemapEvent(InputInterface& ii, LowlevelKeyboardEvent* data, KeyboardManagerState& keyboardManagerState) noexcept;
|
|
|
|
// Function to a handle an app-specific shortcut remap
|
|
__declspec(dllexport) intptr_t HandleAppSpecificShortcutRemapEvent(InputInterface& ii, LowlevelKeyboardEvent* data, KeyboardManagerState& keyboardManagerState) noexcept;
|
|
|
|
// Function to ensure Num Lock state does not change when it is suppressed by the low level hook
|
|
void SetNumLockToPreviousState(InputInterface& ii);
|
|
|
|
// Function to ensure Ctrl/Shift/Alt modifier key state is not detected as pressed down by applications which detect keys at a lower level than hooks when it is remapped for scenarios where its required
|
|
void ResetIfModifierKeyForLowerLevelKeyHandlers(InputInterface& ii, DWORD key, DWORD target);
|
|
};
|