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
International keyboard layouts do not work correctly #2
Comments
Thanks for this. I definitely did not test this with non US keyboard layouts. I'll have to take a look later. |
I can only concur that it's the same issue on a Swedish keyboard. |
So I think I have an idea about what might fix this. Right now I'm converting to keyCode at binding time, but I think if I store the actual character and then on keypress I use |
The "shift-map" concept doesn't work in an international context. But wait, there's more! If you buy Keybaords From Around the World™ (not actually ™) now, we'll throw in all of the following mappings of
"You're forgetting Poland!" I hear you shout. Nope, we haven't forgotten Poland, where |
I would guess that @jamesarosen is all right (unless you can tell the keyboard layout from JavaScript and the browser, on all OS:es you want to support (apart from the browsers) - as far as I know, I've not seen that in any spec or reference. What I think you can do is make a fairly educated guess on keyboard layout based on locale + OS (for Mac keyboards). Good summaries: http://stackoverflow.com/questions/673905/best-way-to-determine-users-locale-within-browser and http://stackoverflow.com/questions/1043339/javascript-for-detecting-browser-language-preference |
Does anyone know if jquery.hotkeys works correctly with international keyboards? I noticed that the way the keys are matched uses I am playing around with it now in a local branch. I hope to have a fix/solution soon. |
If you want a Swedish keyboard I could send you one. Its layout is very similar to Norwegian, Danish and Finnish, yet rather different from US apart from a-z and space. :-) |
If you're willing to use |
By the way, this problem isn't unique to this project. I've raised the issue on Keymaster and KeyboardJS. jquery.hotkeys has the same problem, too. |
Hey. Just wanted to comment here to give you all an update. I just pushed out version 1.1, and I think for the most part this ticket should be resolved. I added support for Basically it is recommended to not specify an event type. For example if you do Mousetrap.bind('?', _shortcuts); Then it will use a If you do Mousetrap.bind('enter', function() {}); Then it will use a |
Works perfectly on Turkish layout. Thanks! |
Henlo, I think that does not work anymore. Tested on main site by doing So, on event contains |
I tried the examples on demo page using standard Turkish (Q) layout, but some of them didn't work. (Namely, '$' and '*'.)
Now I tried them again and somehow made them work. $ character is typed using AltGr+4 combination, but it didn't work with it or the US variant Shift+4; however it works for AltGr+Shift+4.
On the other hand, asterisk character has a seperate key for itself on Turkish layout. But it also doesn't work. It works by combining Turkish and US layouts and pressing AltGr+Shift+8 --and followed by 'a', of course, for the example to work.
The text was updated successfully, but these errors were encountered: