mirror of
https://github.com/streamich/react-use.git
synced 2026-01-18 14:06:52 +00:00
Merge pull request #104 from gavingregory/fix-keypress-docs
docs(useKeyPress): renamed keyboardjs -> useKeyboardJS
This commit is contained in:
commit
07baffdfad
@ -3,9 +3,9 @@
|
||||
React UI sensor hook that detects when the user is pressing a specific
|
||||
key on their keyboard.
|
||||
|
||||
Complex bindings like detecting when multiple keys are held down at the same
|
||||
time or requiring them to be held down in a specified order are also available
|
||||
via [KeyboardJS key combos](https://github.com/RobertWHurst/KeyboardJS).
|
||||
Complex bindings like detecting when multiple keys are held down at the same
|
||||
time or requiring them to be held down in a specified order are also available
|
||||
via [KeyboardJS key combos](https://github.com/RobertWHurst/KeyboardJS).
|
||||
Check its documentation for further details on how to make combo strings.
|
||||
|
||||
## Usage
|
||||
@ -21,7 +21,7 @@ const Demo = () => {
|
||||
const hasPressedT = useKeyPress("t");
|
||||
const hasPressedY = useKeyPress("y");
|
||||
const hasPressedWord = useKeyPress("q + w + e + r + t + y", {
|
||||
keyboardjs: true
|
||||
useKeyboardJS: true
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user