2020-04-20 23:22:36 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace KeyboardManagerConstants
|
|
|
|
{
|
2021-04-27 03:01:38 +08:00
|
|
|
// Event name for signaling settings changes
|
|
|
|
inline const std::wstring SettingsEventName = L"PowerToys_KeyboardManager_Event_Settings";
|
|
|
|
|
|
|
|
inline const std::wstring EditorWindowEventName = L"PowerToys_KeyboardManager_Event_EditorWindow";
|
|
|
|
|
2020-04-20 23:22:36 +08:00
|
|
|
// Name of the powertoy module.
|
|
|
|
inline const std::wstring ModuleName = L"Keyboard Manager";
|
|
|
|
|
|
|
|
// Name of the property use to store current active configuration.
|
|
|
|
inline const std::wstring ActiveConfigurationSettingName = L"activeConfiguration";
|
|
|
|
|
|
|
|
// Name of the property use to store single keyremaps.
|
|
|
|
inline const std::wstring RemapKeysSettingName = L"remapKeys";
|
|
|
|
|
|
|
|
// Name of the property use to store single keyremaps array in case of in process approach.
|
|
|
|
inline const std::wstring InProcessRemapKeysSettingName = L"inProcess";
|
|
|
|
|
|
|
|
// Name of the property use to store shortcut remaps.
|
|
|
|
inline const std::wstring RemapShortcutsSettingName = L"remapShortcuts";
|
|
|
|
|
|
|
|
// Name of the property use to store global shortcut remaps array.
|
|
|
|
inline const std::wstring GlobalRemapShortcutsSettingName = L"global";
|
|
|
|
|
2020-07-11 08:07:28 +08:00
|
|
|
// Name of the property use to store app specific shortcut remaps array.
|
|
|
|
inline const std::wstring AppSpecificRemapShortcutsSettingName = L"appSpecific";
|
|
|
|
|
2020-04-20 23:22:36 +08:00
|
|
|
// Name of the property use to store original keys.
|
|
|
|
inline const std::wstring OriginalKeysSettingName = L"originalKeys";
|
|
|
|
|
|
|
|
// Name of the property use to store new remap keys.
|
|
|
|
inline const std::wstring NewRemapKeysSettingName = L"newRemapKeys";
|
|
|
|
|
2020-07-11 08:07:28 +08:00
|
|
|
// Name of the property use to store the target application.
|
|
|
|
inline const std::wstring TargetAppSettingName = L"targetApp";
|
|
|
|
|
2020-04-20 23:22:36 +08:00
|
|
|
// Name of the default configuration.
|
|
|
|
inline const std::wstring DefaultConfiguration = L"default";
|
|
|
|
|
2021-04-30 22:04:53 +08:00
|
|
|
// monitors with different DPI scaling factor
|
|
|
|
inline const int MinimumEditKeyboardWindowWidth = 200;
|
|
|
|
inline const int MinimumEditKeyboardWindowHeight = 200;
|
|
|
|
|
|
|
|
|
2020-05-29 05:47:32 +08:00
|
|
|
// Flags used for distinguishing key events sent by Keyboard Manager
|
2020-06-06 03:54:52 +08:00
|
|
|
inline const ULONG_PTR KEYBOARDMANAGER_SINGLEKEY_FLAG = 0x11; // Single key remaps
|
|
|
|
inline const ULONG_PTR KEYBOARDMANAGER_SHORTCUT_FLAG = 0x101; // Shortcut remaps
|
|
|
|
inline const ULONG_PTR KEYBOARDMANAGER_SUPPRESS_FLAG = 0x111; // Key events which must be suppressed
|
2020-05-29 05:47:32 +08:00
|
|
|
|
|
|
|
// Dummy key event used in between key up and down events to prevent certain global events from happening
|
|
|
|
inline const DWORD DUMMY_KEY = 0xFF;
|
2020-07-09 07:24:30 +08:00
|
|
|
|
2020-10-09 02:28:37 +08:00
|
|
|
// Number of key messages required while sending a dummy key event
|
|
|
|
inline const size_t DUMMY_KEY_EVENT_SIZE = 2;
|
|
|
|
|
2020-07-11 08:53:41 +08:00
|
|
|
// String constant to represent no activated application in app-specific shortcuts
|
|
|
|
inline const std::wstring NoActivatedApp = L"";
|
2020-04-20 23:22:36 +08:00
|
|
|
}
|