-
Notifications
You must be signed in to change notification settings - Fork 39
Add support for german keyboards #60
Copy link
Copy link
Open
Description
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": "\\",
};
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels