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

Add support for german keyboards #60

Open
felixbarny opened this issue Nov 15, 2013 · 0 comments
Open

Add support for german keyboards #60

felixbarny opened this issue Nov 15, 2013 · 0 comments

Comments

@felixbarny
Copy link

In key.js, the keys are currently hard coded to support japanese and us keyboard layouts, which seems a bit hacky to me. Whats the reason behind this?
If you use the keypress callback rather than keypress in eventhandler.js, you can get the actual typed char regardless of the keyboard layout with String.fromCharCode(e.which).

In my local installation of this plugin, I changed the key identifiers for de, so if String.fromCharCode(e.which) is no option in your opinion, maybe you could add those mappings:

g.key.winKeyIdentifier_de = {
    "U+00BF": "#",
    "U+00DC": "^",
    "U+00E2": "<",
    "U+00BB": "+",
    "U+00BC": ",",
    "U+00BE": ".",   
    "U+00BD": "-",
  };

  g.key.shiftWinKeyIdentifier_de = {    
    "U+00E2": ">",
    "U+00DB": "?",    
    "U+00BE": ":",
    "U+00BD": "_",
    "U+00BB": "*",
    "U+0031": "!",
    "U+0032": '"',   
    "U+0034": "$",
    "U+0035": "%",
    "U+0036": "&",
    "U+0038": "(",
    "U+0039": ")",
    "U+0037": "/",
    "U+0030": "=",
    "U+00BC": ";",  
    "U+00BF": "'",
    "U+00DD": "`"

    // you need [Alt Gr] key for those
    //"U+0030": "}",
    //"U+0037": "{",
    //"U+00E2": "|",
    //"U+00BB": "~",
    //"U+0051": "@",
    //"U+0039": "]",
    //"U+0038": "[",
    //"U+00DB": "\\",
  };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant