UNPKG

@bonsai-components/react-global-keys

Version:

A simple way to add global keys

171 lines (90 loc) 10.3 kB
# Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.3.8](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.3.7...@bonsai-components/react-global-keys@2.3.8) (2025-03-04) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [2.3.7](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.3.6...@bonsai-components/react-global-keys@2.3.7) (2025-03-04) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [2.3.6](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.3.5...@bonsai-components/react-global-keys@2.3.6) (2025-03-04) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [2.3.5](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.3.4...@bonsai-components/react-global-keys@2.3.5) (2025-03-04) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [2.3.4](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.3.3...@bonsai-components/react-global-keys@2.3.4) (2025-03-04) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [2.3.3](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.3.2...@bonsai-components/react-global-keys@2.3.3) (2025-03-04) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [2.3.2](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.3.1...@bonsai-components/react-global-keys@2.3.2) (2025-03-04) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [2.3.1](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.3.0...@bonsai-components/react-global-keys@2.3.1) (2025-03-04) **Note:** Version bump only for package @bonsai-components/react-global-keys # [2.3.0](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.2.1...@bonsai-components/react-global-keys@2.3.0) (2023-03-27) ### Features - **react-global-keys:** add disableKeybindings prop to provider ([7a253ac](https://github.com/zieka/bonsai-components/commit/7a253acecd5d7f6a655eb2a7f73ff0063021f6f2)) ## [2.2.1](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.2.0...@bonsai-components/react-global-keys@2.2.1) (2023-03-14) **Note:** Version bump only for package @bonsai-components/react-global-keys # [2.2.0](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.0.1...@bonsai-components/react-global-keys@2.2.0) (2023-03-14) ### Features - **detect-os:** add new package ([573c663](https://github.com/zieka/bonsai-components/commit/573c6636eb940abdd888efe0908a0f9e49649220)) - **utility-types:** add new utility types package ([eded347](https://github.com/zieka/bonsai-components/commit/eded347697747dd623c98792c2d228b50cde2521)) - **utility-types:** add pure function ([9ae868a](https://github.com/zieka/bonsai-components/commit/9ae868a33953ee6364725f58ed855685668f0537)) # [2.1.0](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.0.1...@bonsai-components/react-global-keys@2.1.0) (2023-03-14) ### Features - **detect-os:** add new package ([573c663](https://github.com/zieka/bonsai-components/commit/573c6636eb940abdd888efe0908a0f9e49649220)) - **utility-types:** add new utility types package ([eded347](https://github.com/zieka/bonsai-components/commit/eded347697747dd623c98792c2d228b50cde2521)) - **utility-types:** add pure function ([9ae868a](https://github.com/zieka/bonsai-components/commit/9ae868a33953ee6364725f58ed855685668f0537)) ## [2.0.1](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@2.0.0...@bonsai-components/react-global-keys@2.0.1) (2022-09-13) ### Bug Fixes - **react-global-keys:** only console log with debug prop set ([86c5bc9](https://github.com/zieka/bonsai-components/commit/86c5bc979012fe161f0576c3789fc1cf34ab6836)) # [2.0.0](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@1.6.0...@bonsai-components/react-global-keys@2.0.0) (2022-09-13) ### Features - add react 18 support ([db17c55](https://github.com/zieka/bonsai-components/commit/db17c553f64770c130a34d983ba06c85bd6f3a64)) - **react-global-keys:** allow alt and shift modifiers when binding by key ([c5e555d](https://github.com/zieka/bonsai-components/commit/c5e555daf34847ed8f9e51d2837456ec6cd85ebe)) - update jest ([7ff7af6](https://github.com/zieka/bonsai-components/commit/7ff7af62c668ed627ae43c482bb0409502a37c3e)) ### BREAKING CHANGES - **react-global-keys:** If you were binding by key and provided specific characters for shift or alt you now need to also provide the appropriate modifier to the modifier objec # [1.6.0](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@1.5.2...@bonsai-components/react-global-keys@1.6.0) (2022-01-11) ### Features - **react-global-keys:** remove prevent default as a default ([6a24afa](https://github.com/zieka/bonsai-components/commit/6a24afa6312b59c337f81013558a857a39301214)) ## [1.5.2](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@1.5.1...@bonsai-components/react-global-keys@1.5.2) (2022-01-08) ### Bug Fixes - **react-global-keys:** make code take higher priority ([f69b378](https://github.com/zieka/bonsai-components/commit/f69b3782705062dedaba411482daea4c7f78acbb)) ## [1.5.1](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@1.5.0...@bonsai-components/react-global-keys@1.5.1) (2022-01-07) ### Bug Fixes - issue shift and alt when binding by code ([0ae8ec1](https://github.com/zieka/bonsai-components/commit/0ae8ec13be1368f610fdeeaa1c2de768b5e35e86)) # [1.5.0](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@1.4.0...@bonsai-components/react-global-keys@1.5.0) (2022-01-07) ### Features - **react-global-keys:** add support for event.code ([783fbd1](https://github.com/zieka/bonsai-components/commit/783fbd1e343a0c17efb9a6c3abeb2aa1c3ed0069)) # [1.4.0](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@1.3.0...@bonsai-components/react-global-keys@1.4.0) (2022-01-03) ### Features - **react-global-keys:** add original key binding to Map for complete meta data ([7277409](https://github.com/zieka/bonsai-components/commit/7277409eafcc39a8b94ee8cd488287a52742c81a)) # [1.3.0](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@1.2.0...@bonsai-components/react-global-keys@1.3.0) (2022-01-03) ### Features - **react-global-keys:** actions accept event argument, keybindings use Map ([bf49dc8](https://github.com/zieka/bonsai-components/commit/bf49dc8276cc945bdfb9caafd0daf12f62d499fa)) - **react-global-keys:** add optional description and getKeyBindingDescriptors ([c456bd0](https://github.com/zieka/bonsai-components/commit/c456bd0313628e1223bae93340b5c73a26adf203)) # [1.2.0](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@1.1.0...@bonsai-components/react-global-keys@1.2.0) (2021-12-27) ### Features - **react-global-keys:** keybinding state is now an object fixing various multi binding issues ([5982b1f](https://github.com/zieka/bonsai-components/commit/5982b1fb4190d14cdaf600ab3d40b244224108bd)) # [1.1.0](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@1.0.3...@bonsai-components/react-global-keys@1.1.0) (2021-12-22) ### Features - **react-global-keys:** make modifier object on KeyBinding optional ([1bfc8a2](https://github.com/zieka/bonsai-components/commit/1bfc8a2fdaeaaf8e875ae131f2056aebab1d9116)) ## [1.0.3](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@1.0.2...@bonsai-components/react-global-keys@1.0.3) (2021-12-22) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [1.0.2](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@1.0.1...@bonsai-components/react-global-keys@1.0.2) (2021-12-22) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [1.0.1](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@1.0.0...@bonsai-components/react-global-keys@1.0.1) (2021-12-22) ### Bug Fixes - **react-global-keys:** bug where bindings got overriden ([180af76](https://github.com/zieka/bonsai-components/commit/180af76535f679b4fe098bada780638ce24cf1ed)) # [1.0.0](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@0.1.4...@bonsai-components/react-global-keys@1.0.0) (2021-12-22) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [0.1.4](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@0.1.3...@bonsai-components/react-global-keys@0.1.4) (2021-12-21) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [0.1.3](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@0.1.2...@bonsai-components/react-global-keys@0.1.3) (2021-12-21) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [0.1.2](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@0.1.1...@bonsai-components/react-global-keys@0.1.2) (2021-12-21) **Note:** Version bump only for package @bonsai-components/react-global-keys ## [0.1.1](https://github.com/zieka/bonsai-components/compare/@bonsai-components/react-global-keys@0.1.0...@bonsai-components/react-global-keys@0.1.1) (2021-12-21) **Note:** Version bump only for package @bonsai-components/react-global-keys # 0.1.0 (2021-12-21) ### Features - **react-global-keys:** initial package commit ([a4673f9](https://github.com/zieka/bonsai-components/commit/a4673f9a232da20b2d191302221cd4aea5542e6d))