Permalink
Browse files

fixes for the seemingly all of the common browser event keysyms

  • Loading branch information...
1 parent 2faab1a commit f3d4da49da5ad60bb15eec4f5c660f794efed92a @substack committed Mar 31, 2011
Showing with 17 additions and 9 deletions.
  1. +15 −4 data/events.json
  2. +1 −4 index.js
  3. +1 −1 package.json
View
@@ -33,9 +33,17 @@
"104" : "*",
"105" : "(",
"107" : "+",
- "109" : "_",
- "110" : ">",
- "188" : "<"
+ "186" : ":",
+ "187" : "+",
+ "188" : "<",
+ "189" : "_",
+ "190" : ">",
+ "191" : "?",
+ "192" : "asciitilde",
+ "219" : "{",
+ "220" : "|",
+ "221" : "}",
+ "222" : "\""
},
"unshifted" : {
"8" : "BackSpace",
@@ -70,12 +78,15 @@
"144" : "Num_Lock",
"145" : "Scroll_Lock",
"186" : ";",
+ "187" : "=",
"188" : ",",
"189" : "-",
"190" : ".",
"191" : "/",
- "219" : "]",
+ "192" : "grave",
+ "219" : "[",
"220" : "\\",
+ "221" : "]",
"222" : "'"
}
}
View
@@ -39,10 +39,7 @@ function lookup (e) {
}
exports.keyEvent = function (code, shiftMask) {
- if (a <= code && code <= z) {
- return code - (shiftMask ? a - A : 0);
- }
- else if (A <= code && code <= Z) {
+ if (A <= code && code <= Z) {
return code + (shiftMask ? 0 : a - A);
}
else if (events.both[code]) {
View
@@ -1,6 +1,6 @@
{
"name" : "keysym",
- "version" : "0.0.3",
+ "version" : "0.0.4",
"description" : "Look up X11 keysyms, unicode positions, and names.",
"main" : "./index.js",
"keywords": [ "x11", "keysym", "key", "unicode" ],

0 comments on commit f3d4da4

Please sign in to comment.