atom-keymap
Advanced tools
Comparing version 0.15.0 to 0.16.0
(function() { | ||
var AtomModifiers, KeyboardEventModifiers, SpecificityCache, fs, isAscii, keyFromCharCode, loophole, modifier, normalizeKeystroke, parseKeystroke, parser, pegjs, specificity, _i, _j, _len, _len1, _ref, _ref1, _ref2; | ||
var AtomModifiers, KeyboardEventModifiers, SpecificityCache, charCodeFromHexCharCode, fs, isAscii, keyFromCharCode, loophole, modifier, normalizeKeystroke, parseKeystroke, parser, pegjs, specificity, _i, _j, _len, _len1, _ref, _ref1, _ref2; | ||
@@ -46,3 +46,3 @@ specificity = require('clear-cut').specificity; | ||
hexCharCode = event.keyIdentifier.slice(2); | ||
charCode = parseInt(hexCharCode, 16); | ||
charCode = charCodeFromHexCharCode(hexCharCode); | ||
if (!isAscii(charCode) && isAscii(event.which)) { | ||
@@ -64,3 +64,3 @@ charCode = event.which; | ||
if (event.shiftKey) { | ||
if (!/^[^A-Za-z]$/.test(key)) { | ||
if (!(/^[^A-Za-z]$/.test(key) && process.platform !== 'linux')) { | ||
keystroke.push('shift'); | ||
@@ -215,2 +215,41 @@ } | ||
charCodeFromHexCharCode = function(hexCharCode) { | ||
var charCode; | ||
charCode = parseInt(hexCharCode, 16); | ||
if (process.platform === 'linux') { | ||
switch (charCode) { | ||
case 186: | ||
charCode = 59; | ||
break; | ||
case 187: | ||
charCode = 61; | ||
break; | ||
case 188: | ||
charCode = 44; | ||
break; | ||
case 189: | ||
charCode = 45; | ||
break; | ||
case 190: | ||
charCode = 46; | ||
break; | ||
case 191: | ||
charCode = 47; | ||
break; | ||
case 219: | ||
charCode = 91; | ||
break; | ||
case 220: | ||
charCode = 92; | ||
break; | ||
case 221: | ||
charCode = 93; | ||
break; | ||
case 222: | ||
charCode = 39; | ||
} | ||
} | ||
return charCode; | ||
}; | ||
keyFromCharCode = function(charCode) { | ||
@@ -217,0 +256,0 @@ switch (charCode) { |
{ | ||
"name": "atom-keymap", | ||
"version": "0.15.0", | ||
"version": "0.16.0", | ||
"description": "Atom's DOM-aware keymap module", | ||
@@ -5,0 +5,0 @@ "main": "./lib/keymap-manager", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38904
1042
1