{"_id":"@borodutch-labs/v-hotkey","_rev":"4-5cae52025cc4cbd8d87c8b3cf7ed7d55","name":"@borodutch-labs/v-hotkey","dist-tags":{"latest":"0.9.1"},"versions":{"0.8.0":{"name":"@borodutch-labs/v-hotkey","version":"0.8.0","description":"Vue 2.x directive - binding hotkeys for components.","author":{"name":"Dafrok","email":"o.o@mug.dog","url":"http://dafrok.github.io"},"scripts":{"build":"vue-cli-service build --target lib --name v-hotkey ./src/index.js","lint":"eslint --ext .js,.vue .","build:docs":"vue-cli-service build ./src/docs/main.js --dest docs","build:docs:dev":"npm run build:docs -- --mode development","dev":"vue-cli-service serve","prepare":"npm run build","test":"vue-cli-service test:unit"},"main":"dist/v-hotkey.common.js","unpkg":"dist/v-hotkey.umd.js","dependencies":{"core-js":"^2.6.5"},"devDependencies":{"@babel/core":"^7.6.4","@babel/preset-env":"^7.6.3","@vue/cli-plugin-babel":"^4.0.0-rc.8","@vue/cli-plugin-unit-jest":"^4.0.0-rc.8","@vue/cli-service":"^4.0.0-rc.8","@vue/test-utils":"1.0.0-beta.29","babel-eslint":"^10.0.3","bulma":"^0.7.5","eslint":"^6.5.1","eslint-config-standard":"^14.1.0","eslint-loader":"^3.0.2","eslint-plugin-import":"^2.18.2","eslint-plugin-jest":"^22.19.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-webpack-template":"^6.2.0","pug":"^2.0.4","pug-plain-loader":"^1.0.0","stylus":"^0.54.7","stylus-loader":"^3.0.2","vue":"^2.6.10","vue-router":"^3.1.3","vue-template-compiler":"^2.6.10"},"peerDependencies":{"vue":"^2.x"},"bugs":{"url":"https://github.com/Dafrok/v-hotkey/issues"},"contributors":[{"name":"Zdravko Ćurić","url":"https://github.com/zcuric"},{"name":"Dario Vladović","url":"https://github.com/vladimyr"}],"homepage":"https://github.com/Dafrok/v-hotkey#readme","jsdelivr":"dist/v-hotkey.umd.js","keywords":["vue","hotkey","hotkeys","directive","shortcut","shortcuts"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Dafrok/v-hotkey.git"},"gitHead":"a7bb78dc8887557b7867d627c497933fe5b00859","_id":"@borodutch-labs/v-hotkey@0.8.0","_nodeVersion":"16.11.1","_npmVersion":"8.1.1","dist":{"integrity":"sha512-w4hRz8/bdjX8l58hEsx5R7wWafM1t/SJAy4NO0gVxo7OGE1LakNrQFXO+fO+CSqa6tEwWUTgAmvqLnm8ZfxoQQ==","shasum":"628f0264fda0b2c9e64fb3b652a15d723e93e28d","tarball":"https://registry.npmjs.org/@borodutch-labs/v-hotkey/-/v-hotkey-0.8.0.tgz","fileCount":9,"unpackedSize":133943,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/78wQCQ1LIBsQaJ/w9LIBJBHK6ydU+iz3ahy+9zR4QQIhAIThPnNmsoql0GWUsZFKdLWlKp+kntpDP3tgSGAqLkeR"}]},"_npmUser":{"name":"upacyxou","email":"upacyxou@gmail.com"},"directories":{},"maintainers":[{"name":"upacyxou","email":"upacyxou@gmail.com"},{"name":"borodutch","email":"nikita@borodutch.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/v-hotkey_0.8.0_1635872027069_0.7259428902408398"},"_hasShrinkwrap":false},"0.9.0":{"name":"@borodutch-labs/v-hotkey","version":"0.9.0","description":"Vue 2.x directive - binding hotkeys for components.","author":{"name":"Dafrok","email":"o.o@mug.dog","url":"http://dafrok.github.io"},"scripts":{"build":"vue-cli-service build --target lib --name v-hotkey ./src/index.js","lint":"eslint --ext .js,.vue .","build:docs":"vue-cli-service build ./src/docs/main.js --dest docs","build:docs:dev":"npm run build:docs -- --mode development","dev":"vue-cli-service serve","prepare":"npm run build","test":"vue-cli-service test:unit"},"main":"dist/v-hotkey.common.js","unpkg":"dist/v-hotkey.umd.js","dependencies":{"core-js":"^2.6.5"},"devDependencies":{"@babel/core":"^7.6.4","@babel/preset-env":"^7.6.3","@vue/cli-plugin-babel":"^4.0.0-rc.8","@vue/cli-plugin-unit-jest":"^4.0.0-rc.8","@vue/cli-service":"^4.0.0-rc.8","@vue/test-utils":"1.0.0-beta.29","babel-eslint":"^10.0.3","bulma":"^0.7.5","eslint":"^6.5.1","eslint-config-standard":"^14.1.0","eslint-loader":"^3.0.2","eslint-plugin-import":"^2.18.2","eslint-plugin-jest":"^22.19.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-webpack-template":"^6.2.0","pug":"^2.0.4","pug-plain-loader":"^1.0.0","stylus":"^0.54.7","stylus-loader":"^3.0.2","vue":"^2.6.10","vue-router":"^3.1.3","vue-template-compiler":"^2.6.10"},"peerDependencies":{"vue":"^2.x"},"bugs":{"url":"https://github.com/Dafrok/v-hotkey/issues"},"contributors":[{"name":"Zdravko Ćurić","url":"https://github.com/zcuric"},{"name":"Dario Vladović","url":"https://github.com/vladimyr"}],"homepage":"https://github.com/Dafrok/v-hotkey#readme","jsdelivr":"dist/v-hotkey.umd.js","keywords":["vue","hotkey","hotkeys","directive","shortcut","shortcuts"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Dafrok/v-hotkey.git"},"gitHead":"72fc8856b3058271983bced903de40920a7f7182","_id":"@borodutch-labs/v-hotkey@0.9.0","_nodeVersion":"16.11.1","_npmVersion":"8.1.3","dist":{"integrity":"sha512-jlBdT1KwzmDKfykF1jgqxXMTIE7QrSg6nqqDHED2DECXLDqlzyhvLrJutLaV7piuO2sns+HL1xzI79MRXYHFkA==","shasum":"3b92184b357efde4ec8c232e5a696910f8be97f6","tarball":"https://registry.npmjs.org/@borodutch-labs/v-hotkey/-/v-hotkey-0.9.0.tgz","fileCount":9,"unpackedSize":135509,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDf9GLuY2gPT8wJk/VoCkUT5xTIWfYEgBU53AcBSRoMOgIhANj2iGyYcFI1g/MsL0kI/vBhQ4Hx86ydz1qkxQZyuHhT"}]},"_npmUser":{"name":"upacyxou","email":"upacyxou@gmail.com"},"directories":{},"maintainers":[{"name":"upacyxou","email":"upacyxou@gmail.com"},{"name":"borodutch","email":"nikita@borodutch.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/v-hotkey_0.9.0_1636462979789_0.4593182907618065"},"_hasShrinkwrap":false},"0.9.1":{"name":"@borodutch-labs/v-hotkey","version":"0.9.1","description":"Vue 2.x directive - binding hotkeys for components.","author":{"name":"Dafrok","email":"o.o@mug.dog","url":"http://dafrok.github.io"},"scripts":{"build":"vue-cli-service build --target lib --name v-hotkey ./src/index.js","lint":"eslint --ext .js,.vue .","build:docs":"vue-cli-service build ./src/docs/main.js --dest docs","build:docs:dev":"npm run build:docs -- --mode development","dev":"vue-cli-service serve","prepare":"npm run build","test":"vue-cli-service test:unit"},"main":"dist/v-hotkey.common.js","unpkg":"dist/v-hotkey.umd.js","dependencies":{"core-js":"^2.6.5"},"devDependencies":{"@babel/core":"^7.6.4","@babel/preset-env":"^7.6.3","@vue/cli-plugin-babel":"^4.0.0-rc.8","@vue/cli-plugin-unit-jest":"^4.0.0-rc.8","@vue/cli-service":"^4.0.0-rc.8","@vue/test-utils":"1.0.0-beta.29","babel-eslint":"^10.0.3","bulma":"^0.7.5","eslint":"^6.5.1","eslint-config-standard":"^14.1.0","eslint-loader":"^3.0.2","eslint-plugin-import":"^2.18.2","eslint-plugin-jest":"^22.19.0","eslint-plugin-node":"^10.0.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","eslint-plugin-vue":"^5.2.3","html-webpack-template":"^6.2.0","pug":"^2.0.4","pug-plain-loader":"^1.0.0","stylus":"^0.54.7","stylus-loader":"^3.0.2","vue":"^2.6.10","vue-router":"^3.1.3","vue-template-compiler":"^2.6.10"},"peerDependencies":{"vue":"^2.x"},"bugs":{"url":"https://github.com/Dafrok/v-hotkey/issues"},"contributors":[{"name":"Zdravko Ćurić","url":"https://github.com/zcuric"},{"name":"Dario Vladović","url":"https://github.com/vladimyr"}],"homepage":"https://github.com/Dafrok/v-hotkey#readme","jsdelivr":"dist/v-hotkey.umd.js","keywords":["vue","hotkey","hotkeys","directive","shortcut","shortcuts"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Dafrok/v-hotkey.git"},"gitHead":"38e409b6138419283e44b7b7774a9f72158a4679","_id":"@borodutch-labs/v-hotkey@0.9.1","_nodeVersion":"16.11.1","_npmVersion":"8.1.3","dist":{"integrity":"sha512-tfEeAShHBJqtn+DTllxwO6Ab8hQJBwdunMbkDq4WLgQzOtY6aovvfoN4tCllhs8eLH4Y2bRw0vFMhcsyaH0flw==","shasum":"3e20cf708d1839d9906208711f36f8e7cb0aec8c","tarball":"https://registry.npmjs.org/@borodutch-labs/v-hotkey/-/v-hotkey-0.9.1.tgz","fileCount":9,"unpackedSize":135379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzZkeCRA9TVsSAnZWagAA60MP/1CH4KO1qxtiN9NGAmom\nFCZqPSs59S8AFO1VK1nOg3PUUIUc6TrlMEFbcsoMXcUYJSCqZ9nWxDMDrUqL\nifPhf+kN13toNYm0ilvQnxHCdEkBhqz6Xc1Fndj+Y85NFzJJ4mctURdMsZQs\nqxZCdWe/IbtsBkNf8Z4SFdDaMccOpDxyxrVX8ZG4EOnF2ICCAsh0kLcX3Vl+\nSxbL8SD8YCf/xJiz8fT7nYNBmdCIU9Ea79x7jzmCB2eK5Zc/jQVCtG+E00Vw\n7ONtRokXX2OGtPgo9yw+laDMC8TneEs80/tGXK2qe/Q8jUmO9c+DDNis68Db\nrJvCmSkowI3PnWsrMmjFEkYBuZzFH2fn4lUoUzBWc1fPSEmbl7uyZ2cwr20o\nfNFDHvFSpO4ta815DgEkEjEw9a8DjsP1GKYzJ2Do+GBJjUTEl7sB7cFCi4pY\n1hGXLsyY9GsyRU8nExthL9nQBxB2CjiB4RtC5ZmAfkEV4HbZpKV1TLXbnVnF\nNBjppXzt48plTTzSUFleiuIG0Ezqbk19KjW7bJL5siWjXqJx9QvWYFnBIf6W\nh0/uHM1LWTK2bwEWLmKY4IZAEsv8sG+nRGaAm/v/Ldh0eXami66XOM1/GUOv\npClVWEbVYifkstUQMH41joWtmkNybL6DgjfFcOcSqThLXa+r8Gb6wYVF3Ylj\n+aJz\r\n=Iu/w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBYGkO2PIqDHsqG4ynzHSo3YPyXF44p8iZU5lMNb2u1mAiEA7KHsSjZPcyWTvRP7I31UAyamIQStj2Ij8SEOAPbj1BY="}]},"_npmUser":{"name":"upacyxou","email":"upacyxou@gmail.com"},"directories":{},"maintainers":[{"name":"upacyxou","email":"upacyxou@gmail.com"},{"name":"borodutch","email":"nikita@borodutch.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/v-hotkey_0.9.1_1636578064989_0.3434825764599587"},"_hasShrinkwrap":false}},"time":{"created":"2021-11-02T16:53:47.019Z","0.8.0":"2021-11-02T16:53:47.225Z","modified":"2022-04-04T20:13:12.775Z","0.9.0":"2021-11-09T13:02:59.934Z","0.9.1":"2021-11-10T21:01:05.209Z"},"maintainers":[{"name":"upacyxou","email":"upacyxou@gmail.com"},{"name":"borodutch","email":"nikita@borodutch.com"}],"description":"Vue 2.x directive - binding hotkeys for components.","homepage":"https://github.com/Dafrok/v-hotkey#readme","keywords":["vue","hotkey","hotkeys","directive","shortcut","shortcuts"],"repository":{"type":"git","url":"git+https://github.com/Dafrok/v-hotkey.git"},"contributors":[{"name":"Zdravko Ćurić","url":"https://github.com/zcuric"},{"name":"Dario Vladović","url":"https://github.com/vladimyr"}],"author":{"name":"Dafrok","email":"o.o@mug.dog","url":"http://dafrok.github.io"},"bugs":{"url":"https://github.com/Dafrok/v-hotkey/issues"},"license":"MIT","readme":"# v-hotkey\n\n[![bundlephobia minified size](https://badgen.net/bundlephobia/min/v-hotkey)](https://bundlephobia.com/result?p=v-hotkey)\n[![npm package version](https://badgen.net/npm/v/v-hotkey)](https://npm.im/v-hotkey)\n[![github license](https://badgen.net/github/license/dafrok/v-hotkey)](https://github.com/dafrok/v-hotkey/blob/master/LICENSE)\n[![js standard style](https://badgen.net/badge/code%20style/standard/pink)](https://standardjs.com)\n\nVue 2.x directive for binding hotkeys to components.\n\n## Play with me\n\n[https://dafrok.github.io/v-hotkey](https://dafrok.github.io/v-hotkey)\n\n## Install\n\n```bash\n$ npm i v-hotkey\n# or\n$ yarn add v-hotkey\n```\n\n## Usage\n\n```javascript\nimport Vue from \"vue\";\nimport VueHotkey from \"v-hotkey\";\n\nVue.use(VueHotkey);\n```\n\n```vue\n<template>\n  <span v-hotkey=\"keymap\" v-show=\"show\">\n    Press `ctrl + esc` to toggle me! Hold `enter` to hide me!\n  </span>\n</template>\n\n<script>\nexport default {\n  data() {\n    return {\n      show: true,\n    };\n  },\n  methods: {\n    toggle() {\n      this.show = !this.show;\n    },\n    show() {\n      this.show = true;\n    },\n    hide() {\n      this.show = false;\n    },\n  },\n  computed: {\n    keymap() {\n      return {\n        // 'esc+ctrl' is OK.\n        \"ctrl+esc\": this.toggle,\n        enter: {\n          keydown: this.hide,\n          keyup: this.show,\n        },\n      };\n    },\n  },\n};\n</script>\n```\n\n## Event Handler\n\n- keydown (as default)\n- keyup\n\n## Key Combination\n\nUse one or more of following keys to fire your hotkeys.\n\n- ctrl\n- alt\n- shift\n- command (MacOS)\n- windows (Windows)\n\n## Modifiers\n\n### prevent\n\nAdd the prevent modifier to the directive to prevent default browser behavior.\n\n```vue\n<template>\n  <span v-hotkey.prevent=\"keymap\" v-show=\"show\">\n    Press `ctrl + esc` to toggle me! Hold `enter` to hide me!\n  </span>\n</template>\n```\n\n### stop\n\nAdd the stop modifier to the directive to stop event propagation.\n\n```vue\n<template>\n  <div v-hotkey.stop=\"keymap\">\n    <span>\n      Enter characters in editable areas doesn't trigger any hotkeys.\n    </span>\n    <input />\n  </div>\n</template>\n```\n\n### forbidden\n\nAdd the forbidden modifier to the directive to allow hotkeys in forbidden elements (i.e. inputs, textfields).\n\n```vue\n<template>\n  <div v-hotkey.forbidden=\"keymap\">\n    <span> Enter characters in editable areas does trigger hotkeys. </span>\n    <input />\n  </div>\n</template>\n```\n\n## Key Code Alias\n\nThe default key code map is based on US standard keyboard.\nThis ability to provide their own key code alias for developers who using keyboards with different layouts. The alias name must be a **single character**.\n\n### Definition\n\n```javascript\nimport Vue from \"vue\";\nimport VueHotkey from \"v-hotkey\";\n\nVue.use(VueHotkey, {\n  \"①\": 49, // the key code of character '1'\n});\n```\n\n### Template\n\n```vue\n<span v-hotkey=\"keymap\"></span>\n<script>\nexport default {\n  foo() {\n    console.log(\"Hooray!\");\n  },\n  computed: {\n    keymap() {\n      return {\n        \"①\": foo,\n      };\n    },\n  },\n};\n</script>\n```\n","readmeFilename":"README.md"}