├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .github ├── actions │ └── build-and-test │ │ └── action.yml └── workflows │ ├── build.yml │ └── release-and-publish.yml ├── .gitignore ├── .husky ├── commit-msg ├── pre-commit └── pre-push ├── .npmrc ├── .storybook └── main.js ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── babel.config.js ├── commitlint.config.js ├── jest.config.js ├── package.json ├── src ├── __tests__ │ ├── helpers │ │ └── fireKeydownEvent.ts │ └── index.test.tsx ├── helpers │ ├── arraysAreEqual.ts │ ├── getActiveModifierKeys.ts │ ├── getHotkeysArray.ts │ ├── ignoreKeydownEvent.ts │ ├── isSameSet.ts │ ├── mapModifierKeys.ts │ ├── modifierKeyPressed.ts │ ├── tail.ts │ └── takeUntilLast.ts ├── index.ts ├── stories │ └── index.stories.tsx └── vendor │ └── shim-keyboard-event-key │ └── index.js ├── tsconfig.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/.editorconfig -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/.eslintignore -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/.eslintrc -------------------------------------------------------------------------------- /.github/actions/build-and-test/action.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/.github/actions/build-and-test/action.yml -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/.github/workflows/build.yml -------------------------------------------------------------------------------- /.github/workflows/release-and-publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/.github/workflows/release-and-publish.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/.gitignore -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/.husky/commit-msg -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | yarn format 5 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/.husky/pre-push -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/.npmrc -------------------------------------------------------------------------------- /.storybook/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/.storybook/main.js -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/.travis.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/README.md -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/babel.config.js -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'] 3 | }; 4 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/jest.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/package.json -------------------------------------------------------------------------------- /src/__tests__/helpers/fireKeydownEvent.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/__tests__/helpers/fireKeydownEvent.ts -------------------------------------------------------------------------------- /src/__tests__/index.test.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/__tests__/index.test.tsx -------------------------------------------------------------------------------- /src/helpers/arraysAreEqual.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/helpers/arraysAreEqual.ts -------------------------------------------------------------------------------- /src/helpers/getActiveModifierKeys.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/helpers/getActiveModifierKeys.ts -------------------------------------------------------------------------------- /src/helpers/getHotkeysArray.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/helpers/getHotkeysArray.ts -------------------------------------------------------------------------------- /src/helpers/ignoreKeydownEvent.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/helpers/ignoreKeydownEvent.ts -------------------------------------------------------------------------------- /src/helpers/isSameSet.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/helpers/isSameSet.ts -------------------------------------------------------------------------------- /src/helpers/mapModifierKeys.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/helpers/mapModifierKeys.ts -------------------------------------------------------------------------------- /src/helpers/modifierKeyPressed.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/helpers/modifierKeyPressed.ts -------------------------------------------------------------------------------- /src/helpers/tail.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/helpers/tail.ts -------------------------------------------------------------------------------- /src/helpers/takeUntilLast.ts: -------------------------------------------------------------------------------- 1 | export default (arr: string[]) => arr.slice(0, -1); 2 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/stories/index.stories.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/stories/index.stories.tsx -------------------------------------------------------------------------------- /src/vendor/shim-keyboard-event-key/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/src/vendor/shim-keyboard-event-key/index.js -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/tsconfig.json -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reecelucas/react-use-hotkeys/HEAD/yarn.lock --------------------------------------------------------------------------------