/ src / modules / keyboardmanager / common / KeyboardManagerConstants.h
KeyboardManagerConstants.h
 1  #pragma once
 2  
 3  namespace KeyboardManagerConstants
 4  {
 5      // Event name for signaling settings changes
 6      inline const std::wstring SettingsEventName = L"PowerToys_KeyboardManager_Event_Settings";
 7  
 8      inline const std::wstring EditorWindowEventName = L"PowerToys_KeyboardManager_Event_EditorWindow";
 9  
10      // Name of the powertoy module.
11      inline const std::wstring ModuleName = L"Keyboard Manager";
12  
13      // Name of the property use to store current active configuration.
14      inline const std::wstring ActiveConfigurationSettingName = L"activeConfiguration";
15  
16      // Name of the property use to store single keyremaps.
17      inline const std::wstring RemapKeysSettingName = L"remapKeys";
18  
19      // Name of the property use to store single to text keyremaps.
20      inline const std::wstring RemapKeysToTextSettingName = L"remapKeysToText";
21  
22      // Name of the property use to store single keyremaps array in case of in process approach.
23      inline const std::wstring InProcessRemapKeysSettingName = L"inProcess";
24  
25      // Name of the property use to store shortcut remaps.
26      inline const std::wstring RemapShortcutsSettingName = L"remapShortcuts";
27  
28      // Name of the property use to store shortcut to text remaps.
29      inline const std::wstring RemapShortcutsToTextSettingName = L"remapShortcutsToText";
30  
31      // Name of the property use to store shortcut to run-program remaps.
32      inline const std::wstring RemapShortcutsToRunProgramSettingName = L"remapShortcutsToRunProgram";
33  
34      // Name of the property use to store global shortcut remaps array.
35      inline const std::wstring GlobalRemapShortcutsSettingName = L"global";
36  
37      // Name of the property use to store app specific shortcut remaps array.
38      inline const std::wstring AppSpecificRemapShortcutsSettingName = L"appSpecific";
39  
40      // Name of the property use to store original keys.
41      inline const std::wstring OriginalKeysSettingName = L"originalKeys";
42  
43      // Name of the property use to store new remap keys.
44      inline const std::wstring NewRemapKeysSettingName = L"newRemapKeys";
45  
46      // Name of the property use to store new remapped string.
47      inline const std::wstring NewTextSettingName = L"unicodeText";
48  
49      // Name of the property use to store runProgramStartInDir.
50      inline const std::wstring RunProgramStartInDirSettingName = L"runProgramStartInDir";
51  
52      // Name of the property use to store runProgramStartInDir.
53      inline const std::wstring RunProgramElevationLevelSettingName = L"runProgramElevationLevel";
54  
55      // Name of the property use to store runProgramAlreadyRunningAction.
56      inline const std::wstring RunProgramAlreadyRunningAction = L"runProgramAlreadyRunningAction";
57  
58      // Name of the property use to store runProgramStartWindowType.
59      inline const std::wstring RunProgramStartWindowType = L"runProgramStartWindowType";
60  
61      // Name of the property use to store runProgramArgs.
62      inline const std::wstring RunProgramArgsSettingName = L"runProgramArgs";
63  
64      // Name of the property use to store runProgramFilePath.
65      inline const std::wstring RunProgramFilePathSettingName = L"runProgramFilePath";
66  
67      // Name of the property use to store openUri.
68      inline const std::wstring ShortcutOpenURI = L"openUri";
69  
70      // Name of the property use to store shortcutOperationType.
71      inline const std::wstring ShortcutOperationType = L"operationType";
72  
73      // Name of the property use to store exactMatch.
74      inline const std::wstring ShortcutExactMatch = L"exactMatch";
75  
76      // Name of the property use to store the target application.
77      inline const std::wstring TargetAppSettingName = L"targetApp";
78  
79      // Name of the default configuration.
80      inline const std::wstring DefaultConfiguration = L"default";
81  
82      // monitors with different DPI scaling factor
83      inline const int MinimumEditKeyboardWindowWidth = 200;
84      inline const int MinimumEditKeyboardWindowHeight = 200;
85  
86      // Flags used for distinguishing key events sent by Keyboard Manager
87      inline const ULONG_PTR KEYBOARDMANAGER_SINGLEKEY_FLAG = 0x11; // Single key remaps
88      inline const ULONG_PTR KEYBOARDMANAGER_SHORTCUT_FLAG = 0x101; // Shortcut remaps
89      inline const ULONG_PTR KEYBOARDMANAGER_SUPPRESS_FLAG = 0x111; // Key events which must be suppressed
90  
91      // Dummy key event used in between key up and down events to prevent certain global events from happening
92      inline const DWORD DUMMY_KEY = 0xFF;
93  
94      // Number of key messages required while sending a dummy key event
95      inline const size_t DUMMY_KEY_EVENT_SIZE = 2;
96  
97      // String constant to represent no activated application in app-specific shortcuts
98      inline const std::wstring NoActivatedApp = L"";
99  }