2020-05-28 14:47:32 -07:00
|
|
|
#pragma once
|
|
|
|
|
#include <keyboardmanager/common/KeyboardManagerState.h>
|
|
|
|
|
#include <keyboardmanager/common/KeyboardManagerConstants.h>
|
2020-06-11 13:07:46 -07:00
|
|
|
#include <keyboardmanager/common/InputInterface.h>
|
2020-05-28 14:47:32 -07:00
|
|
|
|
|
|
|
|
namespace KeyboardEventHandlers
|
|
|
|
|
{
|
|
|
|
|
// Function to a handle a single key remap
|
2020-06-11 13:07:46 -07:00
|
|
|
__declspec(dllexport) intptr_t HandleSingleKeyRemapEvent(InputInterface& ii, LowlevelKeyboardEvent* data, KeyboardManagerState& keyboardManagerState) noexcept;
|
2020-05-28 14:47:32 -07:00
|
|
|
|
|
|
|
|
// Function to a change a key's behavior from toggle to modifier
|
2020-06-11 13:07:46 -07:00
|
|
|
__declspec(dllexport) intptr_t HandleSingleKeyToggleToModEvent(InputInterface& ii, LowlevelKeyboardEvent* data, KeyboardManagerState& keyboardManagerState) noexcept;
|
2020-05-28 14:47:32 -07:00
|
|
|
|
|
|
|
|
// Function to a handle a shortcut remap
|
2020-06-11 13:07:46 -07:00
|
|
|
__declspec(dllexport) intptr_t HandleShortcutRemapEvent(InputInterface& ii, LowlevelKeyboardEvent* data, std::map<Shortcut, RemapShortcut>& reMap, std::mutex& map_mutex) noexcept;
|
2020-05-28 14:47:32 -07:00
|
|
|
|
|
|
|
|
// Function to a handle an os-level shortcut remap
|
2020-06-11 13:07:46 -07:00
|
|
|
__declspec(dllexport) intptr_t HandleOSLevelShortcutRemapEvent(InputInterface& ii, LowlevelKeyboardEvent* data, KeyboardManagerState& keyboardManagerState) noexcept;
|
2020-05-28 14:47:32 -07:00
|
|
|
|
|
|
|
|
// Function to a handle an app-specific shortcut remap
|
2020-06-11 13:07:46 -07:00
|
|
|
__declspec(dllexport) intptr_t HandleAppSpecificShortcutRemapEvent(InputInterface& ii, LowlevelKeyboardEvent* data, KeyboardManagerState& keyboardManagerState) noexcept;
|
2020-06-05 12:54:52 -07:00
|
|
|
|
|
|
|
|
// Function to ensure Num Lock state does not change when it is suppressed by the low level hook
|
2020-06-11 13:07:46 -07:00
|
|
|
void SetNumLockToPreviousState(InputInterface& ii);
|
2020-05-28 14:47:32 -07:00
|
|
|
};
|