Skip to content
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

Problem with char detection on Danish keyboard #16

Closed
netsi1964 opened this issue Jun 10, 2012 · 3 comments
Closed

Problem with char detection on Danish keyboard #16

netsi1964 opened this issue Jun 10, 2012 · 3 comments
Labels
bug

Comments

@netsi1964
Copy link

@netsi1964 netsi1964 commented Jun 10, 2012

When I for instance press "ø" I get this: http://screencast.com/t/6GKvfSg7m

@daffl
Copy link
Contributor

@daffl daffl commented Jun 11, 2012

You're right. I get the same thing when using a German keyboard layout. Unfortunately, getting the right keyCode across browsers is a total mess at best and impossible at worst:
http://unixpapa.com/js/key.html

The best bet is usually using keypress. Maybe we should consider not returning a key name for keydown and keyup events at all.

@justinbmeyer
Copy link
Member

@justinbmeyer justinbmeyer commented Jun 12, 2012

Instead, we should start collecting keyboard-layout maps for people to use. People can add their own map.

@daffl daffl closed this in 0aaeca0 Jun 15, 2012
@daffl
Copy link
Contributor

@daffl daffl commented Jun 15, 2012

In the API documentation you will find a tool that generates an alternate keymap for different keyboard layouts:

http://donejs.com/docs.html#!jQuery.event.key

Since the keyCodes are also different between browsers you need to open it in each browser you want to support and
press the keys that are not mapped correctly. It will generate a mapping that you can copy and provide with your application. Unfortunately there isn't a way to find get the current keyboard layout. The best bet is probably based on the browser language setting (which is unfortunately not very accurate already).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.