├── .husky
├── .gitignore
└── pre-commit
├── website
├── assets
│ └── bg.jpg
├── components
│ ├── Footer.module.css
│ └── Footer.tsx
├── index.tsx
├── vite-env.d.ts
├── vite.config.ts
├── styles
│ ├── reset.css
│ └── index.module.css
├── index.html
├── tsconfig.json
└── App.tsx
├── .github
├── FUNDING.yml
└── workflows
│ ├── pr.yml
│ └── ci.yml
├── .gitignore
├── .editorconfig
├── .npmignore
├── test
├── index.html
└── run.test.js
├── tsconfig.json
├── LICENSE
├── vite.config.ts
├── src
├── var.ts
├── utils.ts
├── types.ts
└── index.ts
├── package.json
├── eslint.config.js
├── dist
├── test-formats.html
├── hotkeys-js.min.js
├── hotkeys-js.umd.cjs
├── index.d.ts
├── hotkeys-js.js
└── hotkeys-js.umd.cjs.map
├── README-zh.md
└── README.md
/.husky/.gitignore:
--------------------------------------------------------------------------------
1 | _
2 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | npx lint-staged
5 |
--------------------------------------------------------------------------------
/website/assets/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaywcjlove/hotkeys-js/HEAD/website/assets/bg.jpg
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | ko_fi: jaywcjlove
2 | buy_me_a_coffee: jaywcjlove
3 | custom: ["https://www.paypal.me/kennyiseeyou", "https://jaywcjlove.github.io/#/sponsor"]
4 |
--------------------------------------------------------------------------------
/website/components/Footer.module.css:
--------------------------------------------------------------------------------
1 | .footer {
2 | text-align: center;
3 | padding: 15px 0 100px 0;
4 | font-size: 12px;
5 | line-height: 20px;
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | npm-debug.log
2 | yarn.lock
3 | node_modules
4 | build
5 | doc
6 | coverage
7 |
8 | .DS_Store
9 | .cache
10 | .vscode
11 | .idea
12 |
13 | *.bak
14 | *.tem
15 | *.temp
16 | #.swp
17 | *.*~
18 | ~*.*
19 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
15 | [Makefile]
16 | indent_style = tab
17 |
--------------------------------------------------------------------------------
/website/index.tsx:
--------------------------------------------------------------------------------
1 | import { createRoot } from 'react-dom/client';
2 | import App from './App';
3 | import './styles/reset.css';
4 |
5 | const container = document.getElementById('root');
6 | if (!container) {
7 | throw new Error('Failed to find the root element');
8 | }
9 | const root = createRoot(container);
10 | root.render(
Test different distribution formats of hotkeys-js library:
37 | 38 |Press F1 to test IIFE version
41 |Press F2 to test UMD version
47 |Press F3 to test ES Module version
53 |Note: This test requires a server environment to work properly due to module loading restrictions in browsers.
55 |