-
-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for spectator.keyboard.pressKey w/ modifier keys #241
Labels
Comments
dedwardstech
changed the title
Support for modifier keys
Support for spectator.keyboard.pressKey w/ modifier keys
Dec 3, 2019
Sounds good to me, I would vote for the |
Let's be consistent and use the Angular syntax: <div (document:keydown.meta.a.g)="doSomething()"></div>
<div (document:keydown.g.c)="doSomething()"></div>
<input (keydown.control.arrowdown)="doSomething()">
<input (keydown.shift.control.z)="doSomething()"> |
I didn't know you could do that! Cool |
Okay, I'll get the PR up today. |
dedwardstech
added a commit
to dedwardstech/spectator
that referenced
this issue
Dec 5, 2019
This commit adds support to spectator.keyboard.pressKey() for triggering key events with modifier keys. Example, spectator.keyboard.pressKey('ctrl.shift.a').
dedwardstech
added a commit
to dedwardstech/spectator
that referenced
this issue
Dec 5, 2019
This commit adds support to spectator.keyboard.pressKey() for triggering key events with modifier keys. Example, spectator.keyboard.pressKey('ctrl.shift.a').
NetanelBasal
pushed a commit
that referenced
this issue
Dec 5, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm submitting a...
Current behavior
spectator.keyboard.pressKey('s')
only supports single key presses. There is currently not a way to fake pressing a keyboard key with modifiers likectrl + shift + s
Expected behavior
I should be able to mock keyboard events like
spectator.keyboard.pressKey('ctrl.shift.s')
What is the motivation / use case for changing the behavior?
Providing a more robust experience when mocking keyboard events.
Others:
I have a PR ready to go for adding this feature. If this feature is deemed appropriate. I just have a question around the syntax and what it should be.
ctrl.shift.s
vsctrl + shift + s
.The text was updated successfully, but these errors were encountered: