-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Software Keymaps are not correctly interpreted / listened to. #88
Software Keymaps are not correctly interpreted / listened to. #88
Conversation
d216c28
to
65da32c
Compare
…indings. Fix an issue with software key-remappings. Fixes adopted-ember-addons#84, superscedes adopted-ember-addons#85 inevitably revert to keyCode, because of characters other than letters
f736acd
to
fe284e4
Compare
// event.preventDefault(); | ||
// event.stopPropagation(); | ||
// } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little dead code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't worry about this; you've done enough. I'll fix it during the release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a ton!!!
My only concern about this approach is that some devs may want strict binding to a key, rather than to a code. For instance, if the dev wanted WASD to navigate through the app, regardless of key mappings. That being said, this seems like a minority use case, and perhaps there's nobody actually using Either way, thanks for all your work on this! You've leveled up |
yeah, I thought about that, too. Like, Blizzard games have their key-bindings by physical code from the keyboard, whereas slack, discord, vim, etc are all software key codes. So... not sure how to support both styles. :-\
<3 |
Hello friends!! @NullVoxPopuli @patience-tema-baron |
@aabzhanova do you have a reproduction? |
@NullVoxPopuli:
this fires:
anything with |
I mean, can you make a reproduction here: https://codesandbox.io/s/github/mike-north/ember-new-output (or in a standalone github repo) it would help us out a ton <3 |
This PR depends on #87
Diff vs #87
I think this'll resove #84, and superscede #85 as well as account for any other keyboard layout.
The gist is that on different keyboard layouts (esp those that aren't hardware enforced (like tho OS-language/region / keyboard layout settings), the KeyboardEvent
s
code` was reporting the hardware key.Here is a test that demonstrates the event
This PR depends on #87, but the main fix is this: