You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hotkeys/static/js/main.52c7c8de.chunk.js.map

1 line
53 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{"version":3,"sources":["components/KeyBoard.module.less","styles/index.module.less","components/Footer.module.less","components/KeyBoard.js","components/Footer.js","components/Markdown/index.js","../README.md","../dist/hotkeys.esm.js","App.js","index.js","components/Markdown/styles/index.module.less"],"names":["module","exports","keyCode","keycode","name","KeyBoard","keyCodeNum","onMouseDown","onMouseUp","className","styles","keyboard","map","item","idx","_item","_idx","key","classNames","pressed","indexOf","data-key","Footer","href","year","children","style","footer","target","rel","hljs","configure","tabReplace","classPrefix","Markdown","code","this","node","getElementsByTagName","i","length","parentNode","tagName","highlightBlock","source","props","ref","markdown","escapeHtml","allowNode","type","test","value","Component","isff","navigator","userAgent","toLowerCase","addEvent","object","event","method","addEventListener","attachEvent","concat","window","getMods","modifier","mods","slice","getKeys","keys","replace","split","index","lastIndexOf","splice","_keyMap","backspace","tab","clear","enter","return","esc","escape","space","left","up","right","down","del","delete","ins","insert","home","end","pageup","pagedown","capslock","'","_modifier","shift","alt","option","ctrl","control","cmd","command","modifierMap","16","18","17","91","shiftKey","ctrlKey","altKey","metaKey","_mods","_handlers","k","_downKeys","_scope","elementHasBindEvent","x","toUpperCase","charCodeAt","setScope","scope","getScope","eachUnbind","_ref","_ref$splitKey","splitKey","forEach","originKey","unbindKeys","len","lastKey","record","a1","a2","arr1","arr2","isIndex","compareArray","eventHandler","handler","modifiersMatch","y","Object","prototype","hasOwnProperty","call","shortcut","preventDefault","returnValue","stopPropagation","cancelBubble","dispatch","asterisk","which","charCode","hotkeys","filter","push","keyName","keyNum","e","getModifierState","keydown","keyup","_i","keyShortcut","_downKeysCurrent","a","sort","join","element","document","undefined","toString","isElementBind","clearModifier","_api","deleteScope","newScope","handlers","getPressedKeyCodes","isPressed","srcElement","flag","isContentEditable","readOnly","unbind","keysInfo","Array","isArray","info","_len","arguments","args","_key","_hotkeys","noConflict","deep","App","state","keyStr","onKeyUpEvent","bind","pkeys","pkeysStr","keysStr","evn","setState","removeEventListener","location","DocumentStrSource","DocumentStr","version","onChange","openVersionWebsite","pkg","keyCodeInfo","header","title","github","onKeyBoardMouseDown","onKeyBoardMouseUp","user","repo","Social","ReactDOM","render","getElementById"],"mappings":"kGACAA,EAAOC,QAAU,CAAC,SAAW,6B,kBCA7BD,EAAOC,QAAU,CAAC,QAAU,wBAAwB,YAAc,4BAA4B,OAAS,uBAAuB,MAAQ,sBAAsB,KAAO,qBAAqB,KAAO,qBAAqB,OAAS,yB,mBCA7ND,EAAOC,QAAU,CAAC,OAAS,yB,mJCIrBC,EAAU,CACd,CAAEC,QAAS,GAAIC,KAAM,CAAC,QACtB,CAAED,QAAS,IAAKC,KAAM,CAAC,OACvB,CAAED,QAAS,IAAKC,KAAM,CAAC,OACvB,CAAED,QAAS,IAAKC,KAAM,CAAC,OACvB,CAAED,QAAS,IAAKC,KAAM,CAAC,OACvB,CAAED,QAAS,IAAKC,KAAM,CAAC,OACvB,CAAED,QAAS,IAAKC,KAAM,CAAC,OACvB,CAAED,QAAS,IAAKC,KAAM,CAAC,OACvB,CAAED,QAAS,IAAKC,KAAM,CAAC,OACvB,CAAED,QAAS,IAAKC,KAAM,CAAC,OACvB,CAAED,QAAS,IAAKC,KAAM,CAAC,QACvB,CAAED,QAAS,IAAKC,KAAM,CAAC,QACvB,CAAED,QAAS,IAAKC,KAAM,CAAC,QACvB,CAAED,SAAU,EAAGC,KAAM,CAAC,WACtB,CAAED,QAAS,IAAKC,KAAM,CAAC,IAAK,MAC5B,CAAED,QAAS,GAAIC,KAAM,CAAC,IAAK,MAC3B,CAAED,QAAS,GAAIC,KAAM,CAAC,IAAK,MAC3B,CAAED,QAAS,GAAIC,KAAM,CAAC,IAAK,MAC3B,CAAED,QAAS,G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,gCA7H5CG,a,cCLjCmL,IAASC,OAAO,kBAAC,GAAD,MAASvD,SAASwD,eAAe,U,mBCLjD1O,EAAOC,QAAU,CAAC,SAAW,2B","file":"static/js/main.52c7c8de.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"keyboard\":\"KeyBoard_keyboard__2q2yc\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"version\":\"styles_version__2esNS\",\"keyCodeInfo\":\"styles_keyCodeInfo__PjAzv\",\"header\":\"styles_header__xIIvk\",\"title\":\"styles_title__2l0LC\",\"lang\":\"styles_lang__2TgEC\",\"info\":\"styles_info__2NfVw\",\"github\":\"styles_github__WH0-j\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"footer\":\"Footer_footer__3gQpi\"};","import React from 'react';\nimport classNames from 'classnames';\n\nimport styles from './KeyBoard.module.less';\n\nconst keyCode = [\n { keycode: 27, name: ['esc'] },\n { keycode: 112, name: ['F1'] },\n { keycode: 113, name: ['F2'] },\n { keycode: 114, name: ['F3'] },\n { keycode: 115, name: ['F4'] },\n { keycode: 116, name: ['F5'] },\n { keycode: 117, name: ['F6'] },\n { keycode: 118, name: ['F7'] },\n { keycode: 119, name: ['F8'] },\n { keycode: 120, name: ['F9'] },\n { keycode: 121, name: ['F10'] },\n { keycode: 122, name: ['F11'] },\n { keycode: 123, name: ['F12'] },\n { keycode: -1, name: [''] },\n { keycode: 192, name: ['~', '`'] },\n { keycode: 49, name: ['!', '1'] },\n { keycode: 50, name: ['@', '2'] },\n { keycode: 51, name: ['#', '3'] },\n { keycode: 52, name: ['$', '4'] },\n { keycode: 53, name: ['%', '5'] },\n { keycode: 54, name: ['^', '6'] },\n { keycode: 55, name: ['&', '7'] },\n { keycode: 56, name: ['*', '8'] },\n { keycode: 57, name: ['(', '9'] },\n { keycode: 48, name: [')', '0'] },\n { keycode: 189, name: ['_', '-'] },\n { keycode: 187, name: ['', ': '] },\n { keycode: 8, name: ['delete'] },\n { keycode: 9, name: ['tab'] },\n { keycode: 81, name: ['Q'] },\n { keycode: 87, name: ['W'] },\n { keycode: 69, name: ['E'] },\n { keycode: 82, name: ['R'] },\n { keycode: 84, name: ['T'] },\n { keycode: 89, name: ['Y'] },\n { keycode: 85, name: ['U'] },\n { keycode: 73, name: ['I'] },\n { keycode: 79, name: ['O'] },\n { keycode: 80, name: ['P'] },\n { keycode: 219, name: ['{', '['] },\n { keycode: 221, name: ['}', ']'] },\n { keycode: 220, name: ['|', '\\\\'] },\n { keycode: 20, name: ['', 'CapsLock'] },\n { keycode: 65, name: ['A'] },\n { keycode: 83, name: ['S'] },\n { keycode: 68, name: ['D'] },\n { keycode: 70, name: ['F'] },\n { keycode: 71, name: ['G'] },\n { keycode: 72, name: ['H'] },\n { keycode: 74, name: ['J'] },\n { keycode: 75, name: ['K'] },\n { keycode: 76, name: ['L'] },\n { keycode: 186, name: [':', ';'] },\n { keycode: 222, name: ['\"', '\\''] },\n { keycode: 13, name: ['enter', 'return'] },\n { keycode: 16, name: ['⇧'] },\n { keycode: 90, name: ['Z'] },\n { keycode: 88, name: ['X'] },\n { keycode: 67, name: ['C'] },\n { keycode: 86, name: ['V'] },\n { keycode: 66, name: ['B'] },\n { keycode: 78, name: ['N'] },\n { keycode: 77, name: ['M'] },\n { keycode: 188, name: ['<', ','] },\n { keycode: 190, name: ['>', '.'] },\n { keycode: 191, name: ['?', '/'] },\n { keycode: 16, name: ['⇧'] },\n { keycode: -1, name: ['fn'] },\n { keycode: 17, name: ['control'] },\n { keycode: 18, name: ['alt', 'option'] },\n { keycode: 91, name: ['command'] },\n { keycode: 32, name: [''] },\n { keycode: 91, name: ['command'] },\n { keycode: 18, name: ['alt', 'option'] },\n { keycode: 37, name: ['◀'] },\n { keycode: 38, name: ['▲'] },\n { keycode: 39, name: ['▶'] },\n { keycode: 40, name: ['▼'] },\n];\n\nexport default function KeyBoard({ keyCode: keyCodeNum, onMouseDown, onMouseUp }) {\n return (\n <div className={styles.keyboard}>\n <ul>\n {keyCode.map((item, idx) => {\n const name = item.name.map((_item, _idx) => <span key={`${_idx}`}>{_item}</span>);\n return (\n <li\n key={idx}\n onMouseDown={() => onMouseDown(item)}\n onMouseUp={() => onMouseUp(item)}\n className={classNames({ pressed: keyCodeNum.indexOf(item.keycode) > -1 })}\n data-key={item.keycode}\n >\n {name}\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n","import React from 'react';\nimport style from './Footer.module.less';\n\nexport default function Footer({ name, href, year, children }) {\n return (\n <div className={style.footer}>\n {children}\n <div>\n Licensed under MIT. (Yes it&acute;s free and\n <a href=\"https://github.com/jaywcjlove/hotkeys\"> open-sourced</a>\n )\n </div>\n <div>\n ©\n <a target=\"_blank\" rel=\"noopener noreferrer\" href={href}>{name}</a>\n {year}\n </div>\n </div>\n );\n}\n","import React, { Component } from 'react';\nimport ReactMarkdown from 'react-markdown';\nimport hljs from 'highlight.js';\nimport classNames from 'classnames';\nimport styles from './styles/index.module.less';\n\nhljs.configure({\n tabReplace: ' ', // 2 spaces\n classPrefix: '', // don't append class prefix\n});\n\nexport default class Markdown extends Component {\n componentDidMount() {\n const code = this.node.getElementsByTagName('code');\n for (let i = 0; i < code.length; i += 1) {\n if (code[i].parentNode && code[i].parentNode.tagName === 'PRE') {\n hljs.highlightBlock(code[i]);\n }\n }\n }\n\n render() {\n const { source } = this.props;\n return (\n <div ref={(node) => { this.node = node; }}>\n <ReactMarkdown\n className={classNames(styles.markdown, 'markdown')}\n source={source}\n escapeHtml={false}\n allowNode={(node) => {\n if (node.type === 'html') {\n if (/<!--([^]+?)-->/.test(node.value)) return false;\n // const scriptValue = node.value.match(/<script.*?>(.*?)<\\/script>/ig);\n // node.value.replace(/<script.*?>(.*?)<\\/script>/, (te) => {\n // console.log('te:', te);\n // });\n }\n return node;\n }}\n />\n </div>\n );\n }\n}\n","export default \"# Hotkeys\\n\\n<!--dividing-->\\n\\n[![](https://img.shields.io/github/issues/jaywcjlove/hotkeys.svg)](https://github.com/jaywcjlove/hotkeys/issues) [![](https://img.shields.io/github/forks/jaywcjlove/hotkeys.svg)](https://github.com/jaywcjlove/hotkeys/network) [![](https://img.shields.io/github/stars/jaywcjlove/hotkeys.svg)](https://github.com/jaywcjlove/hotkeys/stargazers) [![](https://img.shields.io/github/release/jaywcjlove/hotkeys.svg)](https://github.com/jaywcjlove/hotkeys/releases) ![](http://jaywcjlove.github.io/sb/status/no-dependencies.svg) [![Build Status](https://www.travis-ci.org/jaywcjlove/hotkeys.svg?branch=master)](https://www.travis-ci.org/jaywcjlove/hotkeys) [![Coverage Status](https://coveralls.io/repos/github/jaywcjlove/hotkeys/badge.svg?branch=master)](https://coveralls.io/github/jaywcjlove/hotkeys?branch=master) [![jaywcjlove/hotkeys](https://jaywcjlove.github.io/sb/lang/chinese.svg)](./README-zh.md) [![jaywcjlove/hotkeys](https://jaywcjlove.github.io/sb/ico/gitee.svg)](https://gitee.com/jaywcjlove/hotkeys)\\n\\nHotKeys.js is an input capture library with some very special features, it is easy to pick up and use, has a reasonable footprint ([~3kb](https://bundlephobia.com/result?p=hotkeys-js)) (gzipped: 1.73kb), and has no dependencies. It should not interfere with any JavaScript libraries or frameworks. Official document [demo preview](http://jaywcjlove.github.io/hotkeys). [More examples](https://github.com/jaywcjlove/hotkeys/issues?q=label%3ADemo+).\\n\\n```shell\\n╭┈┈╮ ╭┈┈╮ ╭┈┈╮\\n┆ ├┈┈..┈┈┈┈┈.┆ └┈╮┆ ├┈┈..┈┈┈┈┈..┈┈.┈┈..┈┈┈┈┈.\\n┆ ┆┆ □ ┆┆ ┈┤┆ < ┆ -__┘┆ ┆ ┆┆__ ┈┈┤\\n╰┈┈┴┈┈╯╰┈┈┈┈┈╯╰┈┈┈┈╯╰┈┈┴┈┈╯╰┈┈┈┈┈╯╰┈┈┈ ┆╰┈┈┈┈┈╯\\n ╰┈┈┈┈┈╯\\n```\\n\\n## Usage\\n\\nYou will need `Node.js` installed on your system.\\n\\n```shell\\n$ npm install hotkeys-js --save\\n```\\n\\n```js\\nimport hotkeys from 'hotkeys-js';\\n\\nhotkeys('f5', function(event, handler){\\n // Prevent the default refresh event under WINDOWS system\\n event.preventDefault() \\n alert('you pressed F5!') \\n});\\n```\\n\\nOr manually download and link **hotkeys.js** in your HTML, It can also be downloaded via [UNPKG](https://unpkg.com/hotkeys-js/dist/):\\n\\nCDN: [UNPKG](https://unpkg.com/hotkeys-js/dist/) | [jsDelivr](https://cdn.jsdelivr.net/npm/hotkeys-js@3.7.3/) | [Githack](https://raw.githack.com/jaywcjlove/hotkeys/master/dist/hotkeys.min.js) | [Statically](https://cdn.statically.io/gh/jaywcjlove/hotkeys/master/dist/hotkeys.min.js) | [bundle.run](https://bundle.run/hotkeys-js@3.7.3)\\n\\n```html\\n<script src=\\\"https://unpkg.com/hotkeys-js/dist/hotkeys.min.js\\\"></script>\\n<script type=\\\"text/javascript\\\">\\nhotkeys('ctrl+a,ctrl+b,r,f', function (event, handler){\\n switch (handler.key) {\\n case 'ctrl+a': alert('you pressed ctrl+a!');\\n break;\\n case 'ctrl+b': alert('you pressed ctrl+b!');\\n break;\\n case 'r': alert('you pressed r!');\\n break;\\n case 'f': alert('you pressed f!');\\n break;\\n default: alert(event);\\n }\\n});\\n</script>\\n```\\n\\n### Used in React\\n\\n[react-hotkeys](https://github.com/jaywcjlove/react-hotkeys) is the React component that listen to keydown and keyup keyboard events, defining and dispatching keyboard shortcuts. Detailed use method please see its documentation [react-hotkeys](https://github.com/jaywcjlove/react-hotkeys).\\n\\n[react-hotkeys-hook](https://github.com/JohannesKlauss/react-hotkeys-hook) - React hook for using keyboard shortcuts in components. Make sure that you have at least version 16.8 of react and react-dom installed, or otherwise hooks won't work for you.\\n\\n## Browser Support\\n\\nHotkeys.js has been tested and should work in.\\n\\n```shell\\nInternet Explorer 6+\\nSafari\\nFirefox\\nChrome\\n```\\n\\n## Supported Keys\\n\\nHotKeys understands the following modifiers: `⇧`, `shift`, `option`, `⌥`, `alt`, `ctrl`, `control`, `command`, and `⌘`.\\n\\nThe following special keys can be used for shortcuts: backspace, tab, clear, enter, return, esc, escape, space, up, down, left, right, home, end, pageup, pagedown, del, delete and f1 through f19.\\n\\n`⌘` Command() \\n`⌃` Control \\n`⌥` Option(alt) \\n`⇧` Shift \\n`⇪` Caps Lock(Capital) \\n~~`fn` Does not support fn~~ \\n`↩︎` return/Enter space \\n\\n## Defining Shortcuts\\n\\nOne global method is exposed, key which defines shortcuts when called directly.\\n\\n```\\nhotkeys([keys:<String>], [option:[string|object|function]], [callback:<function>])\\n```\\n\\n\\n```js\\nhotkeys('f5', function(event, handler) {\\n // Prevent the default refresh event under WINDOWS system\\n event.preventDefault();\\n alert('you pressed F5!');\\n});\\n\\n// Returning false stops the event and prevents default browser events\\n// Mac OS system defines `command + r` as a refresh shortcut\\nhotkeys('ctrl+r, command+r', function() {\\n alert('stopped reload!');\\n return false;\\n});\\n\\n// Single key\\nhotkeys('a', function(event,handler){\\n //event.srcElement: input \\n //event.target: input\\n if(event.target === \\\"input\\\"){\\n alert('you pressed a!')\\n }\\n alert('you pressed a!') \\n});\\n\\n// Key Combination\\nhotkeys('ctrl+a,ctrl+b,r,f', function (event, handler){\\n switch (handler.key) {\\n case 'ctrl+a': alert('you pressed ctrl+a!');\\n break;\\n case 'ctrl+b': alert('you pressed ctrl+b!');\\n break;\\n case 'r': alert('you pressed r!');\\n break;\\n case 'f': alert('you pressed f!');\\n break;\\n default: alert(event);\\n }\\n});\\n\\nhotkeys('ctrl+a+s', function() {\\n alert('you pressed ctrl+a+s!');\\n});\\n\\n// Using a scope\\nhotkeys('*','wcj', function(event){\\n console.log('do something', event);\\n});\\n```\\n\\n#### option \\n\\n- `scope<String>`\\n- `element<HTMLElement>`\\n- `keyup<Boolean>`\\n- `keydown<Boolean>`\\n- `splitKey<string>` (default is `+`)\\n\\n```js\\nhotkeys('o, enter', {\\n scope: 'wcj',\\n element: document.getElementById('wrapper'),\\n}, function(){ \\n console.log('do something else');\\n});\\n\\nhotkeys('ctrl-+', { splitKey: '-' }, function(e) {\\n console.log('you pressed ctrl and +');\\n});\\n\\nhotkeys('+', { splitKey: '-' }, function(e){\\n console.log('you pressed +');\\n})\\n```\\n\\n## API REFERENCE\\n\\nAsterisk \\\"*\\\"\\n\\nModifier key judgments\\n\\n```js\\nhotkeys('*', function() {\\n if (hotkeys.shift) {\\n console.log('shift is pressed!');\\n }\\n\\n if (hotkeys.ctrl) {\\n console.log('ctrl is pressed!');\\n }\\n\\n if (hotkeys.alt) {\\n console.log('alt is pressed!');\\n }\\n\\n if (hotkeys.option) {\\n console.log('option is pressed!');\\n }\\n\\n if (hotkeys.control) {\\n console.log('control is pressed!');\\n }\\n\\n if (hotkeys.cmd) {\\n console.log('cmd is pressed!');\\n }\\n\\n if (hotkeys.command) {\\n console.log('command is pressed!');\\n }\\n});\\n```\\n\\n### setScope\\n\\nUse the `hotkeys.setScope` method to set scope. There can only be one active scope besides 'all'. By default 'all' is always active.\\n\\n```js\\n// Define shortcuts with a scope\\nhotkeys('ctrl+o, ctrl+alt+enter', 'issues', function(){\\n console.log('do something');\\n});\\nhotkeys('o, enter', 'files', function(){ \\n console.log('do something else');\\n});\\n\\n// Set the scope (only 'all' and 'issues' shortcuts will be honored)\\nhotkeys.setScope('issues'); // default scope is 'all'\\n```\\n\\n### getScope\\n\\nUse the `hotkeys.getScope` method to get scope.\\n\\n```js\\nhotkeys.getScope();\\n```\\n\\n### deleteScope\\n\\nUse the `hotkeys.deleteScope` method to delete a scope. This will also remove all associated hotkeys with it.\\n\\n```js\\nhotkeys.deleteScope('issues');\\n```\\n\\n### unbind\\n\\nSimilar to defining shortcuts, they can be unbound using `hotkeys.unbind`.\\n\\n```js\\n// unbind 'a' handler\\nhotkeys.unbind('a');\\n\\n// Unbind a hotkeys only for a single scope\\n// If no scope is specified it defaults to the current scope (hotkeys.getScope())\\nhotkeys.unbind('o, enter', 'issues');\\nhotkeys.unbind('o, enter', 'files');\\n```\\n\\nUnbind events through functions.\\n\\n```js\\nfunction example() {\\n hotkeys('a', example);\\n hotkeys.unbind('a', example);\\n\\n hotkeys('a', 'issues', example);\\n hotkeys.unbind('a', 'issues', example);\\n}\\n```\\n\\n### isPressed\\n\\nFor example, `hotkeys.isPressed(77)` is true if the `M` key is currently pressed.\\n\\n```js\\nhotkeys('a', function() {\\n console.log(hotkeys.isPressed('a')); //=> true\\n console.log(hotkeys.isPressed('A')); //=> true\\n console.log(hotkeys.isPressed(65)); //=> true\\n});\\n```\\n\\n## keyup\\n\\n**key down** and **key up** both perform callback events.\\n\\n```js\\nhotkeys('ctrl+a,alt+a+s', {keyup: true}, function(event, handler) {\\n if (event.type === 'keydown') {\\n console.log('keydown:', event.type, handler, handler.key);\\n }\\n\\n if (event.type === 'keyup') {\\n console.log('keyup:', event.type, handler, handler.key);\\n }\\n});\\n```\\n\\n### getPressedKeyCodes\\n\\nReturns an array of key codes currently pressed.\\n\\n```js\\nhotkeys('command+ctrl+shift+a,f', function(){\\n console.log(hotkeys.getPressedKeyCodes()); //=> [17, 65] or [70]\\n})\\n```\\n\\n### filter\\n\\nBy default hotkeys are not enabled for `INPUT` `SELECT` `TEXTAREA` elements. `Hotkeys.filter` to return to the `true` shortcut keys set to play a role, `false` shortcut keys set up failure.\\n\\n```js\\nhotkeys.filter = function(event){\\n return true;\\n}\\n//How to add the filter to edit labels. <div contentEditable=\\\"true\\\"></div>\\n//\\\"contentEditable\\\" Older browsers that do not support drops\\nhotkeys.filter = function(event) {\\n var tagName = (event.target || event.srcElement).tagName;\\n return !(tagName.isContentEditable || tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA');\\n}\\n\\nhotkeys.filter = function(event){\\n var tagName = (event.target || event.srcElement).tagName;\\n hotkeys.setScope(/^(INPUT|TEXTAREA|SELECT)$/.test(tagName) ? 'input' : 'other');\\n return true;\\n}\\n```\\n\\n### noConflict\\n\\nRelinquish HotKeyss control of the `hotkeys` variable.\\n\\n```js\\nvar k = hotkeys.noConflict();\\nk('a', function() {\\n console.log(\\\"do something\\\")\\n});\\n\\nhotkeys()\\n// -->Uncaught TypeError: hotkeys is not a function(anonymous function) \\n// @ VM2170:2InjectedScript._evaluateOn \\n// @ VM2165:883InjectedScript._evaluateAndWrap \\n// @ VM2165:816InjectedScript.evaluate @ VM2165:682\\n```\\n \\n## Development\\n\\nTo develop, Install dependencies, Get the code:\\n\\n```shell\\n$ git https://github.com/jaywcjlove/hotkeys.git\\n$ cd hotkeys # Into the directory\\n$ npm install # or yarn install\\n```\\n\\nTo develop, run the self-reloading build:\\n\\n```shell\\n$ npm run watch\\n```\\n\\nRun Document Website Environment.\\n\\n```shell\\n$ npm run doc:dev\\n```\\n\\nTo contribute, please fork Hotkeys.js, add your patch and tests for it (in the `test/` folder) and submit a pull request.\\n\\n```shell\\n$ npm run test\\n$ npm run test:watch # Development model\\n```\\n\\n## License\\n\\n[MIT © Kenny Wong](./LICENSE)\\n\";","/*!\n * hotkeys-js v3.7.6\n * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.\n * \n * Copyright (c) 2020 kenny wong <wowohoo@qq.com>\n * http://jaywcjlove.github.io/hotkeys\n * \n * Licensed under the MIT license.\n */\nvar isff = typeof navigator !== 'undefined' ? navigator.userAgent.toLowerCase().indexOf('firefox') > 0 : false; // 绑定事件\n\nfunction addEvent(object, event, method) {\n if (object.addEventListener) {\n object.addEventListener(event, method, false);\n } else if (object.attachEvent) {\n object.attachEvent(\"on\".concat(event), function () {\n method(window.event);\n });\n }\n} // 修饰键转换成对应的键码\n\n\nfunction getMods(modifier, key) {\n var mods = key.slice(0, key.length - 1);\n\n for (var i = 0; i < mods.length; i++) {\n mods[i] = modifier[mods[i].toLowerCase()];\n }\n\n return mods;\n} // 处理传的key字符串转换成数组\n\n\nfunction getKeys(key) {\n if (typeof key !== 'string') key = '';\n key = key.replace(/\\s/g, ''); // 匹配任何空白字符,包括空格、制表符、换页符等等\n\n var keys = key.split(','); // 同时设置多个快捷键,以','分割\n\n var index = keys.lastIndexOf(''); // 快捷键可能包含',',需特殊处理\n\n for (; index >= 0;) {\n keys[index - 1] += ',';\n keys.splice(index, 1);\n index = keys.lastIndexOf('');\n }\n\n return keys;\n} // 比较修饰键的数组\n\n\nfunction compareArray(a1, a2) {\n var arr1 = a1.length >= a2.length ? a1 : a2;\n var arr2 = a1.length >= a2.length ? a2 : a1;\n var isIndex = true;\n\n for (var i = 0; i < arr1.length; i++) {\n if (arr2.indexOf(arr1[i]) === -1) isIndex = false;\n }\n\n return isIndex;\n}\n\nvar _keyMap = {\n backspace: 8,\n tab: 9,\n clear: 12,\n enter: 13,\n return: 13,\n esc: 27,\n escape: 27,\n space: 32,\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n del: 46,\n delete: 46,\n ins: 45,\n insert: 45,\n home: 36,\n end: 35,\n pageup: 33,\n pagedown: 34,\n capslock: 20,\n '⇪': 20,\n ',': 188,\n '.': 190,\n '/': 191,\n '`': 192,\n '-': isff ? 173 : 189,\n '=': isff ? 61 : 187,\n ';': isff ? 59 : 186,\n '\\'': 222,\n '[': 219,\n ']': 221,\n '\\\\': 220\n}; // Modifier Keys\n\nvar _modifier = {\n // shiftKey\n '⇧': 16,\n shift: 16,\n // altKey\n '⌥': 18,\n alt: 18,\n option: 18,\n // ctrlKey\n '⌃': 17,\n ctrl: 17,\n control: 17,\n // metaKey\n '⌘': 91,\n cmd: 91,\n command: 91\n};\nvar modifierMap = {\n 16: 'shiftKey',\n 18: 'altKey',\n 17: 'ctrlKey',\n 91: 'metaKey',\n shiftKey: 16,\n ctrlKey: 17,\n altKey: 18,\n metaKey: 91\n};\nvar _mods = {\n 16: false,\n 18: false,\n 17: false,\n 91: false\n};\nvar _handlers = {}; // F1~F12 special key\n\nfor (var k = 1; k < 20; k++) {\n _keyMap[\"f\".concat(k)] = 111 + k;\n}\n\nvar _downKeys = []; // 记录摁下的绑定键\n\nvar _scope = 'all'; // 默认热键范围\n\nvar elementHasBindEvent = []; // 已绑定事件的节点记录\n// 返回键码\n\nvar code = function code(x) {\n return _keyMap[x.toLowerCase()] || _modifier[x.toLowerCase()] || x.toUpperCase().charCodeAt(0);\n}; // 设置获取当前范围(默认为'所有'\n\n\nfunction setScope(scope) {\n _scope = scope || 'all';\n} // 获取当前范围\n\n\nfunction getScope() {\n return _scope || 'all';\n} // 获取摁下绑定键的键值\n\n\nfunction getPressedKeyCodes() {\n return _downKeys.slice(0);\n} // 表单控件控件判断 返回 Boolean\n// hotkey is effective only when filter return true\n\n\nfunction filter(event) {\n var target = event.target || event.srcElement;\n var tagName = target.tagName;\n var flag = true; // ignore: isContentEditable === 'true', <input> and <textarea> when readOnly state is false, <select>\n\n if (target.isContentEditable || (tagName === 'INPUT' || tagName === 'TEXTAREA') && !target.readOnly) {\n flag = false;\n }\n\n return flag;\n} // 判断摁下的键是否为某个键返回true或者false\n\n\nfunction isPressed(keyCode) {\n if (typeof keyCode === 'string') {\n keyCode = code(keyCode); // 转换成键码\n }\n\n return _downKeys.indexOf(keyCode) !== -1;\n} // 循环删除handlers中的所有 scope(范围)\n\n\nfunction deleteScope(scope, newScope) {\n var handlers;\n var i; // 没有指定scope获取scope\n\n if (!scope) scope = getScope();\n\n for (var key in _handlers) {\n if (Object.prototype.hasOwnProperty.call(_handlers, key)) {\n handlers = _handlers[key];\n\n for (i = 0; i < handlers.length;) {\n if (handlers[i].scope === scope) handlers.splice(i, 1);else i++;\n }\n }\n } // 如果scope被删除将scope重置为all\n\n\n if (getScope() === scope) setScope(newScope || 'all');\n} // 清除修饰键\n\n\nfunction clearModifier(event) {\n var key = event.keyCode || event.which || event.charCode;\n\n var i = _downKeys.indexOf(key); // 从列表中清除按压过的键\n\n\n if (i >= 0) {\n _downKeys.splice(i, 1);\n } // 特殊处理 cmmand 键,在 cmmand 组合快捷键 keyup 只执行一次的问题\n\n\n if (event.key && event.key.toLowerCase() === 'meta') {\n _downKeys.splice(0, _downKeys.length);\n } // 修饰键 shiftKey altKey ctrlKey (command||metaKey) 清除\n\n\n if (key === 93 || key === 224) key = 91;\n\n if (key in _mods) {\n _mods[key] = false; // 将修饰键重置为false\n\n for (var k in _modifier) {\n if (_modifier[k] === key) hotkeys[k] = false;\n }\n }\n}\n\nfunction unbind(keysInfo) {\n // unbind(), unbind all keys\n if (!keysInfo) {\n Object.keys(_handlers).forEach(function (key) {\n return delete _handlers[key];\n });\n } else if (Array.isArray(keysInfo)) {\n // support like : unbind([{key: 'ctrl+a', scope: 's1'}, {key: 'ctrl-a', scope: 's2', splitKey: '-'}])\n keysInfo.forEach(function (info) {\n if (info.key) eachUnbind(info);\n });\n } else if (typeof keysInfo === 'object') {\n // support like unbind({key: 'ctrl+a, ctrl+b', scope:'abc'})\n if (keysInfo.key) eachUnbind(keysInfo);\n } else if (typeof keysInfo === 'string') {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n } // support old method\n // eslint-disable-line\n\n\n var scope = args[0],\n method = args[1];\n\n if (typeof scope === 'function') {\n method = scope;\n scope = '';\n }\n\n eachUnbind({\n key: keysInfo,\n scope: scope,\n method: method,\n splitKey: '+'\n });\n }\n} // 解除绑定某个范围的快捷键\n\n\nvar eachUnbind = function eachUnbind(_ref) {\n var key = _ref.key,\n scope = _ref.scope,\n method = _ref.method,\n _ref$splitKey = _ref.splitKey,\n splitKey = _ref$splitKey === void 0 ? '+' : _ref$splitKey;\n var multipleKeys = getKeys(key);\n multipleKeys.forEach(function (originKey) {\n var unbindKeys = originKey.split(splitKey);\n var len = unbindKeys.length;\n var lastKey = unbindKeys[len - 1];\n var keyCode = lastKey === '*' ? '*' : code(lastKey);\n if (!_handlers[keyCode]) return; // 判断是否传入范围,没有就获取范围\n\n if (!scope) scope = getScope();\n var mods = len > 1 ? getMods(_modifier, unbindKeys) : [];\n _handlers[keyCode] = _handlers[keyCode].map(function (record) {\n // 通过函数判断,是否解除绑定,函数相等直接返回\n var isMatchingMethod = method ? record.method === method : true;\n\n if (isMatchingMethod && record.scope === scope && compareArray(record.mods, mods)) {\n return {};\n }\n\n return record;\n });\n });\n}; // 对监听对应快捷键的回调函数进行处理\n\n\nfunction eventHandler(event, handler, scope) {\n var modifiersMatch; // 看它是否在当前范围\n\n if (handler.scope === scope || handler.scope === 'all') {\n // 检查是否匹配修饰符如果有返回true\n modifiersMatch = handler.mods.length > 0;\n\n for (var y in _mods) {\n if (Object.prototype.hasOwnProperty.call(_mods, y)) {\n if (!_mods[y] && handler.mods.indexOf(+y) > -1 || _mods[y] && handler.mods.indexOf(+y) === -1) {\n modifiersMatch = false;\n }\n }\n } // 调用处理程序,如果是修饰键不做处理\n\n\n if (handler.mods.length === 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91] || modifiersMatch || handler.shortcut === '*') {\n if (handler.method(event, handler) === false) {\n if (event.preventDefault) event.preventDefault();else event.returnValue = false;\n if (event.stopPropagation) event.stopPropagation();\n if (event.cancelBubble) event.cancelBubble = true;\n }\n }\n }\n} // 处理keydown事件\n\n\nfunction dispatch(event) {\n var asterisk = _handlers['*'];\n var key = event.keyCode || event.which || event.charCode; // 表单控件过滤 默认表单控件不触发快捷键\n\n if (!hotkeys.filter.call(this, event)) return; // Gecko(Firefox)的command键值224在Webkit(Chrome)中保持一致\n // Webkit左右 command 键值不一样\n\n if (key === 93 || key === 224) key = 91;\n /**\n * Collect bound keys\n * If an Input Method Editor is processing key input and the event is keydown, return 229.\n * https://stackoverflow.com/questions/25043934/is-it-ok-to-ignore-keydown-events-with-keycode-229\n * http://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html\n */\n\n if (_downKeys.indexOf(key) === -1 && key !== 229) _downKeys.push(key);\n /**\n * Jest test cases are required.\n * ===============================\n */\n\n ['ctrlKey', 'altKey', 'shiftKey', 'metaKey'].forEach(function (keyName) {\n var keyNum = modifierMap[keyName];\n\n if (event[keyName] && _downKeys.indexOf(keyNum) === -1) {\n _downKeys.push(keyNum);\n } else if (!event[keyName] && _downKeys.indexOf(keyNum) > -1) {\n _downKeys.splice(_downKeys.indexOf(keyNum), 1);\n }\n });\n /**\n * -------------------------------\n */\n\n if (key in _mods) {\n _mods[key] = true; // 将特殊字符的key注册到 hotkeys 上\n\n for (var k in _modifier) {\n if (_modifier[k] === key) hotkeys[k] = true;\n }\n\n if (!asterisk) return;\n } // 将 modifierMap 里面的修饰键绑定到 event 中\n\n\n for (var e in _mods) {\n if (Object.prototype.hasOwnProperty.call(_mods, e)) {\n _mods[e] = event[modifierMap[e]];\n }\n }\n /**\n * https://github.com/jaywcjlove/hotkeys/pull/129\n * This solves the issue in Firefox on Windows where hotkeys corresponding to special characters would not trigger.\n * An example of this is ctrl+alt+m on a Swedish keyboard which is used to type μ.\n * Browser support: https://caniuse.com/#feat=keyboardevent-getmodifierstate\n */\n\n\n if (event.getModifierState && !(event.altKey && !event.ctrlKey) && event.getModifierState('AltGraph')) {\n if (_downKeys.indexOf(17) === -1) {\n _downKeys.push(17);\n }\n\n if (_downKeys.indexOf(18) === -1) {\n _downKeys.push(18);\n }\n\n _mods[17] = true;\n _mods[18] = true;\n } // 获取范围 默认为 `all`\n\n\n var scope = getScope(); // 对任何快捷键都需要做的处理\n\n if (asterisk) {\n for (var i = 0; i < asterisk.length; i++) {\n if (asterisk[i].scope === scope && (event.type === 'keydown' && asterisk[i].keydown || event.type === 'keyup' && asterisk[i].keyup)) {\n eventHandler(event, asterisk[i], scope);\n }\n }\n } // key 不在 _handlers 中返回\n\n\n if (!(key in _handlers)) return;\n\n for (var _i = 0; _i < _handlers[key].length; _i++) {\n if (event.type === 'keydown' && _handlers[key][_i].keydown || event.type === 'keyup' && _handlers[key][_i].keyup) {\n if (_handlers[key][_i].key) {\n var record = _handlers[key][_i];\n var splitKey = record.splitKey;\n var keyShortcut = record.key.split(splitKey);\n var _downKeysCurrent = []; // 记录当前按键键值\n\n for (var a = 0; a < keyShortcut.length; a++) {\n _downKeysCurrent.push(code(keyShortcut[a]));\n }\n\n if (_downKeysCurrent.sort().join('') === _downKeys.sort().join('')) {\n // 找到处理内容\n eventHandler(event, record, scope);\n }\n }\n }\n }\n} // 判断 element 是否已经绑定事件\n\n\nfunction isElementBind(element) {\n return elementHasBindEvent.indexOf(element) > -1;\n}\n\nfunction hotkeys(key, option, method) {\n _downKeys = [];\n var keys = getKeys(key); // 需要处理的快捷键列表\n\n var mods = [];\n var scope = 'all'; // scope默认为all所有范围都有效\n\n var element = document; // 快捷键事件绑定节点\n\n var i = 0;\n var keyup = false;\n var keydown = true;\n var splitKey = '+'; // 对为设定范围的判断\n\n if (method === undefined && typeof option === 'function') {\n method = option;\n }\n\n if (Object.prototype.toString.call(option) === '[object Object]') {\n if (option.scope) scope = option.scope; // eslint-disable-line\n\n if (option.element) element = option.element; // eslint-disable-line\n\n if (option.keyup) keyup = option.keyup; // eslint-disable-line\n\n if (option.keydown !== undefined) keydown = option.keydown; // eslint-disable-line\n\n if (typeof option.splitKey === 'string') splitKey = option.splitKey; // eslint-disable-line\n }\n\n if (typeof option === 'string') scope = option; // 对于每个快捷键进行处理\n\n for (; i < keys.length; i++) {\n key = keys[i].split(splitKey); // 按键列表\n\n mods = []; // 如果是组合快捷键取得组合快捷键\n\n if (key.length > 1) mods = getMods(_modifier, key); // 将非修饰键转化为键码\n\n key = key[key.length - 1];\n key = key === '*' ? '*' : code(key); // *表示匹配所有快捷键\n // 判断key是否在_handlers中不在就赋一个空数组\n\n if (!(key in _handlers)) _handlers[key] = [];\n\n _handlers[key].push({\n keyup: keyup,\n keydown: keydown,\n scope: scope,\n mods: mods,\n shortcut: keys[i],\n method: method,\n key: keys[i],\n splitKey: splitKey\n });\n } // 在全局document上设置快捷键\n\n\n if (typeof element !== 'undefined' && !isElementBind(element) && window) {\n elementHasBindEvent.push(element);\n addEvent(element, 'keydown', function (e) {\n dispatch(e);\n });\n addEvent(window, 'focus', function () {\n _downKeys = [];\n });\n addEvent(element, 'keyup', function (e) {\n dispatch(e);\n clearModifier(e);\n });\n }\n}\n\nvar _api = {\n setScope: setScope,\n getScope: getScope,\n deleteScope: deleteScope,\n getPressedKeyCodes: getPressedKeyCodes,\n isPressed: isPressed,\n filter: filter,\n unbind: unbind\n};\n\nfor (var a in _api) {\n if (Object.prototype.hasOwnProperty.call(_api, a)) {\n hotkeys[a] = _api[a];\n }\n}\n\nif (typeof window !== 'undefined') {\n var _hotkeys = window.hotkeys;\n\n hotkeys.noConflict = function (deep) {\n if (deep && window.hotkeys === hotkeys) {\n window.hotkeys = _hotkeys;\n }\n\n return hotkeys;\n };\n\n window.hotkeys = hotkeys;\n}\n\nexport default hotkeys;","import React, { Component } from 'react';\nimport GithubCorner from '@uiw/react-github-corners';\nimport { Github } from '@uiw/react-shields';\nimport KeyBoard from './components/KeyBoard';\nimport Footer from './components/Footer';\nimport Markdown from './components/Markdown';\nimport styles from './styles/index.module.less';\nimport DocumentStr from '../README.md';\nimport hotkeys from '..';\nimport pkg from '../package.json';\n\nexport default class App extends Component {\n constructor() {\n super();\n this.state = {\n keyCode: [],\n keyStr: [],\n };\n this.onKeyUpEvent = this.onKeyUpEvent.bind(this);\n }\n\n componentDidMount() {\n document.addEventListener('keyup', this.onKeyUpEvent);\n function pkeys(keys, key) {\n if (keys.indexOf(key) === -1) keys.push(key);\n return keys;\n }\n function pkeysStr(keysStr, key) {\n if (keysStr.indexOf(key) === -1) keysStr.push(key);\n return keysStr;\n }\n hotkeys('*', (evn) => {\n evn.preventDefault();\n const keys = [];\n const keyStr = [];\n if (hotkeys.shift) {\n pkeys(keys, 16);\n pkeysStr(keyStr, 'shift');\n }\n if (hotkeys.ctrl) {\n pkeys(keys, 17);\n pkeysStr(keyStr, 'ctrl');\n }\n if (hotkeys.alt) {\n pkeys(keys, 18);\n pkeysStr(keyStr, 'alt');\n }\n if (hotkeys.control) {\n pkeys(keys, 17);\n pkeysStr(keyStr, 'control');\n }\n if (hotkeys.command) {\n pkeys(keys, 91);\n pkeysStr(keyStr, 'command');\n }\n keyStr.push(evn.keyCode);\n if (keys.indexOf(evn.keyCode) === -1) keys.push(evn.keyCode);\n this.setState({ keyCode: keys, keyStr });\n });\n return false;\n }\n\n componentWillUnmount() {\n document.removeEventListener('keyup', this.onKeyUpEvent);\n }\n\n onKeyUpEvent() {\n this.setState({ keyCode: [], keyStr: [] });\n }\n\n onKeyBoardMouseDown(item) {\n if (item.keycode > -1) {\n this.setState({ keyStr: [item.keycode] });\n }\n }\n\n onKeyBoardMouseUp() {\n this.setState({ keyStr: [] });\n }\n\n openVersionWebsite(e) {\n if (e.target && e.target.value) {\n window.location.href = e.target.value;\n }\n }\n\n render() {\n const { keyStr, keyCode } = this.state;\n let DocumentStrSource = DocumentStr;\n if (DocumentStrSource) DocumentStrSource = DocumentStr.replace(/([\\s\\S]*)<!--dividing-->/, '');\n return (\n <div>\n <select className={styles.version} onChange={this.openVersionWebsite.bind(this)}>\n <option value=\"https://jaywcjlove.github.io/hotkeys\">\n v\n {pkg.version}\n </option>\n <option value=\"https://unpkg.com/hotkeys-js@3.4.3/doc/index.html\">v3.4.3</option>\n <option value=\"https://unpkg.com/hotkeys-js@3.4.2/doc/index.html\">v3.4.2</option>\n <option value=\"https://unpkg.com/hotkeys-js@2.0.10/doc/index.html\">v2.0.10</option>\n </select>\n {keyStr.length > -1 && (\n <div className={styles.keyCodeInfo}>\n {keyStr.map((item) => <span key={`${item}`}>{item}</span>)}\n </div>\n )}\n <GithubCorner href=\"https://github.com/jaywcjlove/hotkeys\" target=\"__blank\" />\n <div className={styles.header}>\n <div className={styles.title}>HotKeys.js</div>\n <div className={styles.github}>\n <a href=\"https://www.npmjs.com/package/hotkeys-js\">\n <button type=\"button\">On NPM</button>\n </a>\n <a href=\"https://github.com/jaywcjlove/hotkeys/\">\n <button type=\"button\">Fork on Github</button>\n </a>\n <a href=\"https://github.com/jaywcjlove/hotkeys/\">\n <button type=\"button\">Doc on Github</button>\n </a>\n <a href=\"https://jaywcjlove.gitee.io/hotkeys/\">\n <button type=\"button\">Doc on Gitee</button>\n </a>\n </div>\n <div className={styles.info}>A robust Javascript library for capturing keyboard input and key combinations entered. It has no dependencies. Try to press your keyboard, The following button will highlight.</div>\n </div>\n <KeyBoard\n onMouseDown={this.onKeyBoardMouseDown.bind(this)}\n onMouseUp={this.onKeyBoardMouseUp.bind(this)}\n keyCode={keyCode}\n />\n <Markdown source={DocumentStrSource} />\n <Footer name=\"Kenny Wong\" href=\"http://jaywcjlove.github.io\" year=\"2015-present\">\n <Github user=\"jaywcjlove\" repo=\"hotkeys\">\n <Github.Social href=\"https://github.com/jaywcjlove/hotkeys\" type=\"forks\" />\n <Github.Social href=\"https://github.com/jaywcjlove/hotkeys\" type=\"stars\" />\n <Github.Social href=\"https://github.com/jaywcjlove/hotkeys\" type=\"watchers\" />\n <Github.Social href=\"https://github.com/jaywcjlove/hotkeys\" type=\"followers\" />\n </Github>\n </Footer>\n </div>\n );\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport '@uiw/reset.css';\nimport './styles/reset.less';\n\nReactDOM.render(<App />, document.getElementById('root'));\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"markdown\":\"styles_markdown__1kazu\"};"],"sourceRoot":""}