Socket
Socket
Sign inDemoInstall

keycode

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keycode - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

LICENSE

15

component.json

@@ -5,3 +5,3 @@ {

"description": "Map of keyboard codes",
"version": "1.0.1",
"version": "2.0.0",
"development": {

@@ -13,3 +13,14 @@ "timoxley/assert": "*"

],
"license": "MIT"
"license": "MIT",
"keywords": [
"keyboard",
"keycode",
"keyboardevent",
"ascii",
"keydown",
"keyup",
"metakey",
"keyname",
"keypress"
]
}

13

index.js

@@ -68,3 +68,2 @@ // Source: http://jsfiddle.net/vWx8V/

'delete': 46,
'windows': 91,
'command': 91,

@@ -92,6 +91,2 @@ 'right click': 93,

"'": 222,
'⇧': 16,
'⌥': 18,
'⌃': 17,
'⌘': 91,
}

@@ -102,7 +97,9 @@

var aliases = exports.aliases = {
'shift': 16,
'windows': 91,
'⇧': 16,
'⌥': 18,
'⌃': 17,
'⌘': 91,
'ctl': 17,
'ctrl': 17,
'control': 17,
'alt': 18,
'option': 18,

@@ -109,0 +106,0 @@ 'pause': 19,

{
"name": "keycode",
"description": "Map of keyboard codes",
"version": "1.0.1",
"description": "Convert between keyboard keycodes and keynames and vice versa.",
"version": "2.0.0",
"main": "index.js",

@@ -17,3 +17,2 @@ "directories": {

},
"author": "Tim Oxley",
"license": "MIT",

@@ -24,7 +23,18 @@ "bugs": {

"devDependencies": {
"mocha": "~1.12.0"
"mocha": "^2.1.0"
},
"homepage": "https://github.com/timoxley/keycode",
"dependencies": {},
"keywords": []
"keywords": [
"keyboard",
"keycode",
"keyboardevent",
"ascii",
"keydown",
"keyup",
"metakey",
"keyname",
"keypress"
],
"author": "Tim Oxley <secoif@gmail.com>"
}

@@ -94,1 +94,6 @@ "use strict"

it('should return shift, ctrl, and alt for 16, 17, and 18', function() {
assert.strictEqual(keycode(16), 'shift')
assert.strictEqual(keycode(17), 'ctrl')
assert.strictEqual(keycode(18), 'alt')
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc