[KBM] Fix shortcut remap scenarios that should/should not open start menu (#7171)

* Modify  shortcut to key code more similar to shortcut to shortcuts code. Manually tested cases

* Fixed existing tests and fixed scenario with other keys pressed and action key released

* Fixed dummy key usage

* Updated comments and removed dummy key usage in key to shortcut remaps

* Added tests for disable and shortcut to key. Pending tests for dummy key

* Added test cases for each usage of dummy key event

* Remove redundant check
This commit is contained in:
Arjun Balgovind
2020-10-15 08:53:43 -07:00
committed by GitHub
parent 598729f84c
commit 438169e64f
3 changed files with 766 additions and 104 deletions

View File

@@ -9,14 +9,16 @@ public:
KeyShortcutUnion targetShortcut;
bool isShortcutInvoked;
ModifierKey winKeyInvoked;
// This bool value is only required for remapping shortcuts to Disable
bool isOriginalActionKeyPressed;
RemapShortcut(const KeyShortcutUnion& sc) :
targetShortcut(sc), isShortcutInvoked(false), winKeyInvoked(ModifierKey::Disabled)
targetShortcut(sc), isShortcutInvoked(false), winKeyInvoked(ModifierKey::Disabled), isOriginalActionKeyPressed(false)
{
}
RemapShortcut() :
targetShortcut(Shortcut()), isShortcutInvoked(false), winKeyInvoked(ModifierKey::Disabled)
targetShortcut(Shortcut()), isShortcutInvoked(false), winKeyInvoked(ModifierKey::Disabled), isOriginalActionKeyPressed(false)
{
}