Uh oh!
There was an error while loading. Please reload this page.
feat(keycodes): add utilities for checking modifier keys - #13933
Conversation
67c1142 to
686af5bComparecrisbeto
commented
Nov 1, 2018
@devversion I'm not too sure how the tests should be set up with Bazel since this isn't an |
686af5b to
d177b56Comparedevversion
commented
Nov 1, 2018
@crisbeto Have a look in the |
d177b56 to
a4e5487Comparejelbourn
commented
Nov 1, 2018
This one is definitely a |
crisbeto
commented
Nov 2, 2018
@devversion by the looks of it, the |
a4e5487 to
b775035Comparedevversion
commented
Nov 2, 2018
@crisbeto Ah I didn't realize you wanted to run them in the browser. You should be able to use Just be aware that the one in |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
5e4b368 to
98ad3aeCompareafc33bb to
d87603aComparecrisbeto
commented
Nov 3, 2018
Sorted out the test issues with help from @devversion. @jelbourn@devversion can you take another look? |
c1e35cc to
b3d65f4CompareBased off of the conversation in angular#13790, these changes add some utilities for dealing with modifier keys on keyboard events.
b3d65f4 to
3e4ea4eCompare| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
| type ModifierKey = 'altKey' | 'shiftKey' | 'ctrlKey' | 'metaKey'; |
There was a problem hiding this comment.
should we use an enum for this?
There was a problem hiding this comment.
We could, but I wanted to keep the consumption as short as possible. With the enum people would need another import and the call would look like hasModifierKeys(event, ModifierKey.altKey, ModifierKey.shiftKey) which gets a little long.
There was a problem hiding this comment.
Strings also make sense here because they are the real properties on KeyboardEvent
Based off of the conversation in #13790, these changes add some utilities for dealing with modifier keys on keyboard events.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Based off of the conversation in #13790, these changes add some utilities for dealing with modifier keys on keyboard events.