react-hotkeys-hook 5.0.0-2 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +1 -1
  2. package/package.json +6 -2
package/README.md CHANGED
@@ -136,7 +136,7 @@ useHotkeys(keys: string | string[], callback: (event: KeyboardEvent, handler: Ho
136
136
 
137
137
  | Parameter | Type | Required? | Default value | Description |
138
138
  |---------------|---------------------------------------------------------|-----------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
139
- | `keys` | `string` or `string[]` | required | - | set the hotkeys you want the hook to listen to. You can use single or multiple keys, modifier combinations, etc. This will either be a string or an array of strings. To separate multiple keys, use a colon. This split key value can be overridden with the `splitKey` option. |
139
+ | `keys` | `string` or `string[]` | required | - | set the hotkeys you want the hook to listen to. You can use single or multiple keys, modifier combinations, etc. This will either be a string or an array of strings. To separate multiple keys, use a comma. This split key value can be overridden with the `splitKey` option. |
140
140
  | `callback` | `(event: KeyboardEvent, handler: HotkeysEvent) => void` | required | - | This is the callback function that will be called when the hotkey is pressed. The callback will receive the browsers native `KeyboardEvent` and the libraries `HotkeysEvent`. |
141
141
  | `options` | `Options` | optional | `{}` | Object to modify the behavior of the hook. Default options are given below. |
142
142
  | `dependencies` | `DependencyList` | optional | `[]` | The given callback will always be memoised inside the hook. So if you reference any outside variables, you need to set them here for the callback to get updated (Much like `useCallback` works in React). |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-hotkeys-hook",
3
3
  "description": "React hook for handling keyboard shortcuts",
4
- "version": "5.0.0-2",
4
+ "version": "5.0.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/JohannesKlauss/react-keymap-hook.git"
@@ -36,5 +36,9 @@
36
36
  },
37
37
  "workspaces": [
38
38
  "packages/*"
39
- ]
39
+ ],
40
+ "peerDependencies": {
41
+ "react": ">=16.8.0",
42
+ "react-dom": ">=16.8.0"
43
+ }
40
44
  }