mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Improve warnings for KBM (dev/build-features) (#2386)
* Handled invalid input for single key remaps * Added some functions * Added better error message functions and finished warnings for edit keyboard * Updated dropdown order of keys * Added new warning template for shortcuts * Added show warning on Apply code * Removed old flyout code * Fixed issue where tooltips were replaced on Apply * Simplified == operator
This commit is contained in:
@@ -41,6 +41,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// == operator
|
||||
inline bool operator==(const Shortcut& sc) const
|
||||
{
|
||||
return (winKey == sc.winKey && ctrlKey == sc.ctrlKey && altKey == sc.altKey && shiftKey == sc.shiftKey && actionKey == sc.actionKey);
|
||||
}
|
||||
|
||||
// Less than operator must be defined to use with std::map.
|
||||
inline bool operator<(const Shortcut& sc) const
|
||||
{
|
||||
@@ -168,4 +174,10 @@ public:
|
||||
|
||||
// Function to get the number of modifiers that are common between the current shortcut and the shortcut in the argument
|
||||
int GetCommonModifiersCount(const Shortcut& input) const;
|
||||
|
||||
// Function to check if the two shortcuts are equal or cover the same set of keys. Return value depends on type of overlap
|
||||
static KeyboardManagerHelper::ErrorType DoKeysOverlap(const Shortcut& first, const Shortcut& second);
|
||||
|
||||
// Function to check if the shortcut is illegal (i.e. Win+L or Ctrl+Alt+Del)
|
||||
KeyboardManagerHelper::ErrorType IsShortcutIllegal() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user