mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-05 10:47:55 +08:00
f2cfd90c46
* Added localization code to pipeline and created one LocProject json for Settings * Fixed typo * Reordered nuget source * Moved nuget install to restore step * Added FZ.rc file to LocProj * Added FZ resx file and modified rc file * Fixed file names * Changed to check folder for LocProject files * Updated folder * Changed directory * Changed to src directory * Changed language set and name format, removed rc file localization * Added all projects with resx/resw files * Added newline to end of file * Removed nuget source as it is not used * Updated comments * Updated keyboard manager to use resx file * Tweaked resources.resx and added it to project files * Added comments and added in string table to resx script * Remove change from bad merge * Fix syntax error in convert stringtable * Changed file type to None * Migrated color picker's resources * Migrated resources for Microsoft.Launcher * Migrated resources for fancy zones * Revert fancyzones changes * Migrated resources for ImageResizer and modified script to add language specific code * Added try catch and checks for modification to avoid unnecessary file creation * Changed tab insertion to 4 spaces to avoid mixed file types in rc file * Migrated resources for power preview project * Added LocProject.json file for 5 projects * added resgen exception check * Moved non-localizable strings out of resx for powerpreview
102 lines
4.6 KiB
C++
102 lines
4.6 KiB
C++
#pragma once
|
|
#include <string>
|
|
#include <winrt/base.h>
|
|
#include "../../common/common.h"
|
|
#include "keyboardmanager/dll/Generated Files/resource.h"
|
|
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
|
|
|
namespace KeyboardManagerConstants
|
|
{
|
|
// 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";
|
|
|
|
// Name of the property use to store app specific shortcut remaps array.
|
|
inline const std::wstring AppSpecificRemapShortcutsSettingName = L"appSpecific";
|
|
|
|
// 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";
|
|
|
|
// Name of the property use to store the target application.
|
|
inline const std::wstring TargetAppSettingName = L"targetApp";
|
|
|
|
// Name of the default configuration.
|
|
inline const std::wstring DefaultConfiguration = L"default";
|
|
|
|
// Name of the named mutex used for configuration file.
|
|
inline const std::wstring ConfigFileMutexName = L"PowerToys.KeyboardManager.ConfigMutex";
|
|
|
|
// Name of the dummy update file.
|
|
inline const std::wstring DummyUpdateFileName = L"settings-updated.json";
|
|
|
|
// Minimum and maximum size of a shortcut
|
|
inline const long MinShortcutSize = 2;
|
|
inline const long MaxShortcutSize = 3;
|
|
|
|
// Default window sizes
|
|
inline const int DefaultEditKeyboardWindowWidth = 800;
|
|
inline const int DefaultEditKeyboardWindowHeight = 600;
|
|
inline const int DefaultEditShortcutsWindowWidth = 1050;
|
|
inline const int DefaultEditShortcutsWindowHeight = 600;
|
|
|
|
// Key Remap table constants
|
|
inline const long RemapTableColCount = 4;
|
|
inline const long RemapTableHeaderCount = 2;
|
|
inline const long RemapTableOriginalColIndex = 0;
|
|
inline const long RemapTableArrowColIndex = 1;
|
|
inline const long RemapTableNewColIndex = 2;
|
|
inline const long RemapTableRemoveColIndex = 3;
|
|
inline const DWORD64 RemapTableDropDownWidth = 110;
|
|
|
|
// Shortcut table constants
|
|
inline const long ShortcutTableColCount = 5;
|
|
inline const long ShortcutTableHeaderCount = 3;
|
|
inline const long ShortcutTableOriginalColIndex = 0;
|
|
inline const long ShortcutTableArrowColIndex = 1;
|
|
inline const long ShortcutTableNewColIndex = 2;
|
|
inline const long ShortcutTableTargetAppColIndex = 3;
|
|
inline const long ShortcutTableRemoveColIndex = 4;
|
|
inline const DWORD64 ShortcutTableDropDownWidth = 110;
|
|
inline const DWORD64 ShortcutTableDropDownSpacing = 10;
|
|
|
|
// Drop down height used for both Edit Keyboard and Edit Shortcuts
|
|
inline const DWORD64 TableDropDownHeight = 200;
|
|
inline const DWORD64 TableArrowColWidth = 20;
|
|
inline const DWORD64 TableRemoveColWidth = 20;
|
|
inline const DWORD64 TableWarningColWidth = 20;
|
|
inline const DWORD64 TableTargetAppColWidth = ShortcutTableDropDownWidth + 50;
|
|
|
|
// Shared style constants for both Remap Table and Shortcut Table
|
|
inline const DWORD64 HeaderButtonWidth = 100;
|
|
|
|
// Flags used for distinguishing key events sent by Keyboard Manager
|
|
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
|
|
|
|
// Dummy key event used in between key up and down events to prevent certain global events from happening
|
|
inline const DWORD DUMMY_KEY = 0xFF;
|
|
|
|
// String constant for the default app name in Remap shortcuts
|
|
inline const std::wstring DefaultAppName = GET_RESOURCE_STRING(IDS_EDITSHORTCUTS_ALLAPPS);
|
|
|
|
// String constant to represent no activated application in app-specific shortcuts
|
|
inline const std::wstring NoActivatedApp = L"";
|
|
} |