Skip to content

Commit

Permalink
Merge pull request #281 from louisrli/patch-1
Browse files Browse the repository at this point in the history
Update README to reflect lack of filter scoping
  • Loading branch information
JohannesKlauss authored Jun 24, 2020
2 parents 1826f71 + 99e0b88 commit 8b03949
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ section on the hotkeys documentation for more info.
gets hit by the user. **Important:** Since version 1.5.0 this callback gets memoised inside the hook. So you don't have
to do this anymore by yourself.
- `options: Options = {}`
- `filter: (event: KeyboardEvent): boolean` is used to enable hotkeys inside input elements. Check out [hotkeys docs](https://github.com/jaywcjlove/hotkeys/#filter) for usage
- * `enableOnTags: string[]` is used to enable listening to hotkeys in form fields. Available values are `INPUT`, `TEXTAREA` and `SELECT`. **IMPORTANT!** When you provide a custom `filter` implementation function this parameter will be ignored.
- `filter: (event: KeyboardEvent): boolean` is used to enable hotkeys inside input elements. Check out [hotkeys docs](https://github.com/jaywcjlove/hotkeys/#filter) for usage. Due to constraints with the base library, `filter` is a global setting. As a result, it is currently not possible to have different filters for separate calls of `useHotkey`.
- * `enableOnTags: string[]` is used to enable listening to hotkeys in form fields. Available values are `INPUT`, `TEXTAREA` and `SELECT`. **IMPORTANT!** When you provide a custom `filter` implementation function this parameter will be ignored. Similar to `filter`, setting this option will enable it globally.
- `splitKey: string` is used to change the splitting character inside the keys argument. Default is `+`, but if you want
to listen to the `+` character, you can set `splitKey` to i.e. `-` and listen for `ctrl-+`
- `keyup: boolean` Determine if you want to listen on the keyup event
Expand Down

0 comments on commit 8b03949

Please sign in to comment.