2020-05-28 14:47:32 -07:00
# pragma once
2020-07-13 11:49:09 -07:00
# include <map>
# include <mutex>
# include "keyboardmanager/common/KeyboardManagerConstants.h"
2020-07-31 14:06:13 +03:00
# include <common/LowlevelKeyboardEvent.h>
2020-07-13 11:49:09 -07:00
class InputInterface ;
class KeyboardManagerState ;
class Shortcut ;
class RemapShortcut ;
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
2020-10-08 11:28:24 -07:00
/* This feature has not been enabled (code from proof of concept stage)
*
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-10-08 11:28:24 -07:00
*/
2020-05-28 14:47:32 -07:00
// Function to a handle a shortcut remap
2020-10-08 11:28:24 -07:00
__declspec ( dllexport ) intptr_t HandleShortcutRemapEvent ( InputInterface & ii , LowlevelKeyboardEvent * data , KeyboardManagerState & keyboardManagerState , const std : : optional < std : : wstring > & activatedApp = std : : nullopt ) 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-06-15 16:48:00 -07:00
2020-07-23 16:43:49 -07:00
// 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 ) ;
2020-05-28 14:47:32 -07:00
} ;