-
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept individual modifier keys as valid keybindings (#637)
* extend keystrokes to mod keys * fix doubled keys * remove comments * remove console-log * Removed whitespace from keystrokes * Run prettier * Updated normalizeKeystroke to account for empty string * Check for empty string in key * Check for empty string * Checking for whitespace * Trim whitespace * Added check for keys * refactor add space for puley modifier key * Changed tests to reflect mod keys creating events * Changed tests to match key bindings * Revert test changes * remove added white space * Removed ctrl key from test to check functionality * Modified test * delay modifier key only execution * Update packages/commands/src/index.ts Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com> * re-write * removed redundantcode * Ran Prettier to fix failing test * Update packages/commands/src/index.ts Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com> * Refactored func and test * modifier key bindings trigger on key holds * reverted changed test * undo reverted test changes * Ran Prettier * Starts the timer for mod keys only before updating the keystrokes list * Update packages/commands/src/index.ts Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com> * added new variable with a shorter delay * ran yarn run api and committing changes * ran linter * refactor variable to camelcase * refactor variable to camelcase * updated api * Clear modifier timeout if an exact match is found --------- Co-authored-by: m158261 <141649264+m158261@users.noreply.github.com> Co-authored-by: EC2 Default User <m158261@users.noreply.github.com> Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com> Co-authored-by: Nicolas Brichet <nicolas.brichet@quantstack.net>
- Loading branch information
1 parent
4af2eca
commit ededf7f
Showing
5 changed files
with
87 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters