{"_id":"@alexsasharegan/browser-shortcuts","_rev":"4-15e32d22d2b09e54f548f1771f87c03e","name":"@alexsasharegan/browser-shortcuts","description":"Create compound shortcut events and attach listeners.","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@alexsasharegan/browser-shortcuts","version":"1.0.0","description":"A set of named constants mapping to event keycodes.","main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/alexsasharegan/browser-shortcuts.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npm run build-src && npm run build-prod && npm run bundle-src && npm run bundle-prod","build-prod":"BABEL_ENV=production babel src -o dist/index.min.js","build-src":"babel src -d dist","bundle-src":"browserify dist -o dist/bundle.js","bundle-prod":"browserify dist/index.min.js -o dist/bundle.min.js","publish":"npm run build && npm publish --access=public","patch":"npm run build && npm version patch","minor":"npm run build && npm version minor","major":"npm run build && npm version major"},"keywords":["keycodes","events","shortcuts"],"author":{"name":"Alex Regan","email":"alex.joseph.regan@gmail.com","url":"https://github.com/alexsasharegan"},"license":"ISC","devDependencies":{"babel-cli":"^6.23.0","babel-preset-env":"^1.1.8","babel-preset-es2015":"^6.22.0","babili":"^0.0.11","browserify":"^14.1.0"},"dependencies":{"@alexsasharegan/keycodes":"^2.0.4","component-emitter":"^1.2.1"},"gitHead":"2888fc44428856bee2680c4cf6dc798eb48a6ece","bugs":{"url":"https://github.com/alexsasharegan/browser-shortcuts/issues"},"homepage":"https://github.com/alexsasharegan/browser-shortcuts#readme","_id":"@alexsasharegan/browser-shortcuts@1.0.0","_shasum":"1b41e6341684071913081fda5b000a73266a3999","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"alexsasharegan","email":"alex.joseph.regan@gmail.com"},"dist":{"shasum":"1b41e6341684071913081fda5b000a73266a3999","tarball":"https://registry.npmjs.org/@alexsasharegan/browser-shortcuts/-/browser-shortcuts-1.0.0.tgz","integrity":"sha512-nLN5/yWv0yNtWzz5eS6TREHS7wWuPj6VfHRwBTuUK3ZFDcOaG0Lr7zJo9B20uQ9nSAhrAjh0NPtHwE7pzR1h0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjzAI18MjBRRsLV7OnfMVuhZ0/vsPitbsnu30wFwvC/gIgPUagdlbahgKI7NHKQJj1CQcEl5rzJnrUSf4T50N0FOI="}]},"maintainers":[{"name":"alexsasharegan","email":"alex.joseph.regan@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/browser-shortcuts-1.0.0.tgz_1488181248948_0.8307104331906885"}},"1.0.1":{"name":"@alexsasharegan/browser-shortcuts","version":"1.0.1","description":"Create compound shortcut events and attach listeners.","main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/alexsasharegan/browser-shortcuts.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npm run build-src && npm run build-prod && npm run bundle-src && npm run bundle-prod","build-prod":"BABEL_ENV=production babel src -o dist/index.min.js","build-src":"babel src -d dist","bundle-src":"browserify dist -o dist/bundle.js","bundle-prod":"browserify dist/index.min.js -o dist/bundle.min.js","publish":"npm publish --access=public","patch":"npm run build && npm version patch","minor":"npm run build && npm version minor","major":"npm run build && npm version major"},"keywords":["keycodes","events","shortcuts"],"author":{"name":"Alex Regan","email":"alex.joseph.regan@gmail.com","url":"https://github.com/alexsasharegan"},"license":"ISC","devDependencies":{"babel-cli":"^6.23.0","babel-preset-env":"^1.1.8","babel-preset-es2015":"^6.22.0","babili":"^0.0.11","browserify":"^14.1.0"},"dependencies":{"@alexsasharegan/keycodes":"^2.0.4","component-emitter":"^1.2.1"},"gitHead":"c8c48fd50632f98f266e943d644a6811c0c19903","bugs":{"url":"https://github.com/alexsasharegan/browser-shortcuts/issues"},"homepage":"https://github.com/alexsasharegan/browser-shortcuts#readme","_id":"@alexsasharegan/browser-shortcuts@1.0.1","_shasum":"059951fe9fd232d0aca8d73792464ed121cb3366","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"alexsasharegan","email":"alex.joseph.regan@gmail.com"},"dist":{"shasum":"059951fe9fd232d0aca8d73792464ed121cb3366","tarball":"https://registry.npmjs.org/@alexsasharegan/browser-shortcuts/-/browser-shortcuts-1.0.1.tgz","integrity":"sha512-59iYlAinC5Fy9jLKbEr9zyir7DIHc1u9CC/d+E9XDGqO9w10AHbrON27jwH5bL1Kb2tQFICwlmaZMdtgOhirSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrC+a/PQxmZA6L6foR/cnkUavX66XtwKVI3KqC8rfrVwIhAPk4T830ZE0XJfpKPG6IRlus7BuyILQJz6b/NpreD8cK"}]},"maintainers":[{"name":"alexsasharegan","email":"alex.joseph.regan@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/browser-shortcuts-1.0.1.tgz_1488181442233_0.3961297236382961"}},"1.0.2":{"name":"@alexsasharegan/browser-shortcuts","version":"1.0.2","description":"Create compound shortcut events and attach listeners.","main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/alexsasharegan/browser-shortcuts.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npm run build-src && npm run build-prod && npm run bundle-src && npm run bundle-prod","build-prod":"BABEL_ENV=production babel src -o dist/index.min.js","build-src":"babel src -d dist","bundle-src":"browserify dist -o dist/bundle.js","bundle-prod":"browserify dist/index.min.js -o dist/bundle.min.js","publish":"npm publish --access=public","patch":"npm run build && npm version patch","minor":"npm run build && npm version minor","major":"npm run build && npm version major"},"keywords":["keycodes","events","shortcuts"],"author":{"name":"Alex Regan","email":"alex.joseph.regan@gmail.com","url":"https://github.com/alexsasharegan"},"license":"ISC","devDependencies":{"babel-cli":"^6.23.0","babel-preset-env":"^1.1.8","babel-preset-es2015":"^6.22.0","babili":"^0.0.11","browserify":"^14.1.0"},"dependencies":{"@alexsasharegan/keycodes":"^2.0.4","component-emitter":"^1.2.1"},"gitHead":"1868e0722898fe1cb45f975636969747741004ed","bugs":{"url":"https://github.com/alexsasharegan/browser-shortcuts/issues"},"homepage":"https://github.com/alexsasharegan/browser-shortcuts#readme","_id":"@alexsasharegan/browser-shortcuts@1.0.2","_shasum":"42dcc860ab965361509017a1cb0e9698668056ab","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"alexsasharegan","email":"alex.joseph.regan@gmail.com"},"dist":{"shasum":"42dcc860ab965361509017a1cb0e9698668056ab","tarball":"https://registry.npmjs.org/@alexsasharegan/browser-shortcuts/-/browser-shortcuts-1.0.2.tgz","integrity":"sha512-AQv98vO5Bw58ElU3/zFuBiHJ0yQE1u486WXoLoS/JZnsDg4nXiEjmR4lWtDcBEBeNjuRP/UJIjIjpKeuVnHxnw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEHtbkuW19UPcddIzTWvVKeqiI3LHgFSg0HCcX0Q6Lg2AiEAzINr2CMRYw8ZHY/J2J0c4HxadJz9NiUCPLEtISVFEPA="}]},"maintainers":[{"name":"alexsasharegan","email":"alex.joseph.regan@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/browser-shortcuts-1.0.2.tgz_1488233859369_0.16508762980811298"}}},"readme":"# browser-shortcuts\n\n\n## Installation\n\n#### NPM\n```sh\nnpm i @alexsasharegan/browser-shortcuts\n```\n\n#### Yarn\n\n```sh\nyarn add @alexsasharegan/browser-shortcuts\n```\n\n## Example\n\n```js\nconst Shortcuts = require('@alexsasharegan/browser-shortcuts');\n\n// instantiation registers the internal keydown/keyup listeners\nconst shortcuts = new Shortcuts(node = window);\n\nshortcuts.createShortcut('save','command+s') // creates a \"save\" event that listens for command + s\n         .createShortcut('test',['shift+t', 'control+t']) // creates a \"test\" event with multiple sequences\n         .on('test',() => console.log('Event fired: test'))\n         .on('save',() => console.log('Event fired: save'));\n\n// removes internal event listeners, but maintains shortcut listeners\nshortcuts.pauseListening();\n// re-adds internal event listeners\nshortcuts.resumeListening();\n\n// remove internal event listeners & shortcut listeners\nshortcuts.destroy();\n```\n\n\n#### Key Names (case insensitive)\n```json\n{\n  \"BACKSPACE\": 8,\n  \"TAB\": 9,\n  \"CLEAR\": 12,\n  \"RETURN\": 13,\n  \"ENTER\": 13,\n  \"SHIFT\": 16,\n  \"CONTROL\": 17,\n  \"ALT\": 18,\n  \"OPTION\": 18,\n  \"PAUSE_BREAK\": 19,\n  \"CAPS_LOCK\": 20,\n  \"ESCAPE\": 27,\n  \"SPACE_BAR\": 32,\n  \"PAGE_UP\": 33,\n  \"PAGE_DOWN\": 34,\n  \"END\": 35,\n  \"HOME\": 36,\n  \"LEFT_ARROW\": 37,\n  \"UP_ARROW\": 38,\n  \"RIGHT_ARROW\": 39,\n  \"DOWN_ARROW\": 40,\n  \"INSERT\": 45,\n  \"DELETE\": 46,\n  \"COMMAND\": [\n    91,\n    93,\n    224\n  ],\n  \"COMMAND_LEFT\": [\n    91,\n    224\n  ],\n  \"WINDOWS\": [\n    91,\n    224\n  ],\n  \"COMMAND_RIGHT\": [\n    93,\n    224\n  ],\n  \"WINDOWS_MENU\": [\n    93,\n    224\n  ],\n  \"NUMPAD_ASTERISK\": 106,\n  \"NUMPAD_PLUS\": 107,\n  \"NUMPAD_DASH\": 109,\n  \"NUMPAD_MINUS\": 109,\n  \"NUMPAD_HYPHEN\": 109,\n  \"NUMPAD_PERIOD\": 110,\n  \"NUMPAD_FORWARD_SLASH\": 111,\n  \"NUM_LOCK\": 144,\n  \"SCROLL_LOCK\": 145,\n  \"MY_COMPUTER\": 182,\n  \"MY_CALCULATOR\": 183,\n  \"SEMICOLON\": 186,\n  \"EQUALS\": 187,\n  \"COMMA\": 188,\n  \"DASH\": 189,\n  \"MINUS\": 189,\n  \"HYPHEN\": 189,\n  \"PERIOD\": 190,\n  \"FORWARD_SLASH\": 191,\n  \"BACKTICK\": 192,\n  \"LEFT_BRACKET\": 219,\n  \"BACKSLASH\": 220,\n  \"RIGHT_BRACKET\": 221,\n  \"APOSTROPHE\": 222,\n  \"A\": 65,\n  \"B\": 66,\n  \"C\": 67,\n  \"D\": 68,\n  \"E\": 69,\n  \"F\": 70,\n  \"G\": 71,\n  \"H\": 72,\n  \"I\": 73,\n  \"J\": 74,\n  \"K\": 75,\n  \"L\": 76,\n  \"M\": 77,\n  \"N\": 78,\n  \"O\": 79,\n  \"P\": 80,\n  \"Q\": 81,\n  \"R\": 82,\n  \"S\": 83,\n  \"T\": 84,\n  \"U\": 85,\n  \"V\": 86,\n  \"W\": 87,\n  \"X\": 88,\n  \"Y\": 89,\n  \"Z\": 90,\n  \"F1\": 112,\n  \"F2\": 113,\n  \"F3\": 114,\n  \"F4\": 115,\n  \"F5\": 116,\n  \"F6\": 117,\n  \"F7\": 118,\n  \"F8\": 119,\n  \"F9\": 120,\n  \"F10\": 121,\n  \"F11\": 122,\n  \"F12\": 123,\n  \"F13\": 124,\n  \"F14\": 125,\n  \"F15\": 126,\n  \"F16\": 127,\n  \"F17\": 128,\n  \"F18\": 129,\n  \"F19\": 130,\n  \"ZERO\": 48,\n  \"ONE\": 49,\n  \"TWO\": 50,\n  \"THREE\": 51,\n  \"FOUR\": 52,\n  \"FIVE\": 53,\n  \"SIX\": 54,\n  \"SEVEN\": 55,\n  \"EIGHT\": 56,\n  \"NINE\": 57,\n  \"NUMPAD_ZERO\": 96,\n  \"NUMPAD_ONE\": 97,\n  \"NUMPAD_TWO\": 98,\n  \"NUMPAD_THREE\": 99,\n  \"NUMPAD_FOUR\": 100,\n  \"NUMPAD_FIVE\": 101,\n  \"NUMPAD_SIX\": 102,\n  \"NUMPAD_SEVEN\": 103,\n  \"NUMPAD_EIGHT\": 104,\n  \"NUMPAD_NINE\": 105\n}\n```","maintainers":[{"name":"alexsasharegan","email":"alex.joseph.regan@gmail.com"}],"time":{"modified":"2022-06-12T14:29:04.279Z","created":"2017-02-27T07:40:50.949Z","1.0.0":"2017-02-27T07:40:50.949Z","1.0.1":"2017-02-27T07:44:04.068Z","1.0.2":"2017-02-27T22:17:41.269Z"},"homepage":"https://github.com/alexsasharegan/browser-shortcuts#readme","keywords":["keycodes","events","shortcuts"],"repository":{"type":"git","url":"git+https://github.com/alexsasharegan/browser-shortcuts.git"},"author":{"name":"Alex Regan","email":"alex.joseph.regan@gmail.com","url":"https://github.com/alexsasharegan"},"bugs":{"url":"https://github.com/alexsasharegan/browser-shortcuts/issues"},"license":"ISC","readmeFilename":"README.md"}