-
Notifications
You must be signed in to change notification settings - Fork 11
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
KeyCode vs Key #46
Comments
it's tricky. Let me describe the situation I'm in and how to use your library here. In my app, I'll let the user define shortcuts. There is an input, when clicked records the shortcut and saves it. Also the shortcut is displayed in the UI. At the moment uses
With two solutions:
The problem is double when displaying of the shortcut. I have a map that can be used to display code2symbol. Second is, the
My summary for the moment:
Given these and the chance of never been able to register a certain shortuct (alghouth possible) is inacceptable. To manoveur out of this displaying dilemma, there might be the possible to treat alphanumeric characters in a special manner. They are registered with their respective Would love to get some input from you guys. [1] https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key |
Here's another related wrinkle - in IE11 the 'escape' key event is 'Esc' whereas in most modern browsers it is 'Escape'. So if you register an execution key of 'Escape' it fails in IE11. Using |
I just run into the issue, that I am about to register
shift
+alt
+cmd
+f
as macro. When you press and hold thealt
key on a mac, the keyboard layout turns into something different and let's you access symbols. E.g.alt
+f
=ƒ
. In order to register the macroalt
+f
on a mac, you need to registeralt
+ƒ
as macro. It is not thekey
which isF
but the representation of what they key is, when all modifiers applied. I ended up with a case, where my final key with all modifieres was an empty string. Something which is not appliable as a macro. This line:ember-key-manager/addon/services/key-manager.js
Line 125 in dc0db28
It should be
event.code
instead ofevent.key
(this would also fix #25). Sticking withevent.key
is error prone.An idea would be to map the
executionKey
to their equivalentkeyCode
.I subclassed your service in my app (basically for a nicer API of myself). I will play around with this and report back.
The text was updated successfully, but these errors were encountered: