mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[KBM] decoupling editor and engine (#11133)
This commit is contained in:
@@ -40,67 +40,11 @@ namespace KeyboardManagerConstants
|
||||
// Name of the default configuration.
|
||||
inline const std::wstring DefaultConfiguration = L"default";
|
||||
|
||||
// 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;
|
||||
|
||||
// Increasing the min size can cause issues when moving the window between
|
||||
// monitors with different DPI scaling factor
|
||||
inline const int MinimumEditKeyboardWindowWidth = 200;
|
||||
inline const int MinimumEditKeyboardWindowHeight = 200;
|
||||
|
||||
inline const int EditKeyboardTableMinWidth = 700;
|
||||
|
||||
inline const int DefaultEditShortcutsWindowWidth = 1050;
|
||||
inline const int DefaultEditShortcutsWindowHeight = 600;
|
||||
|
||||
// Increasing the min size can cause issues when moving the window between
|
||||
// monitors with different DPI scaling factor
|
||||
inline const int MinimumEditShortcutsWindowWidth = 200;
|
||||
inline const int MinimumEditShortcutsWindowHeight = 200;
|
||||
|
||||
inline const int EditShortcutsTableMinWidth = 1000;
|
||||
|
||||
// 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 long ShortcutArrowColumnWidth = 90;
|
||||
inline const DWORD64 ShortcutTableDropDownWidth = 110;
|
||||
inline const DWORD64 ShortcutTableDropDownSpacing = 10;
|
||||
inline const long ShortcutOriginColumnWidth = 3 * ShortcutTableDropDownWidth + 2 * ShortcutTableDropDownSpacing;
|
||||
inline const long ShortcutTargetColumnWidth = 3 * ShortcutTableDropDownWidth + 2 * ShortcutTableDropDownSpacing + 25;
|
||||
|
||||
// Drop down height used for both Edit Keyboard and Edit Shortcuts
|
||||
inline const DWORD64 TableDropDownHeight = 200;
|
||||
inline const DWORD64 TableArrowColWidth = 230;
|
||||
inline const DWORD64 TableRemoveColWidth = 20;
|
||||
inline const DWORD64 TableWarningColWidth = 20;
|
||||
inline const DWORD64 TableTargetAppColWidth = ShortcutTableDropDownWidth + TableRemoveColWidth * 2;
|
||||
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user