Skip to content

Commit

Permalink
[KBM] Fix shortcut remap scenarios that should/should not open start …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
arjunbalgovind committed Oct 15, 2020
1 parent 598729f commit 438169e
Show file tree
Hide file tree
Showing 3 changed files with 762 additions and 100 deletions.
6 changes: 4 additions & 2 deletions src/modules/keyboardmanager/common/RemapShortcut.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ class RemapShortcut
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)
{
}

Expand Down

0 comments on commit 438169e

Please sign in to comment.