Added docs to useKeyboard
This commit is contained in:
parent
266ea0d218
commit
c543f15c81
@ -2,6 +2,10 @@ import { useEffect, useContext } from "react";
|
||||
|
||||
import KeyboardContext from "../contexts/KeyboardContext";
|
||||
|
||||
/**
|
||||
* @param {KeyboardEvent} onKeyDown
|
||||
* @param {KeyboardEvent} onKeyUp
|
||||
*/
|
||||
function useKeyboard(onKeyDown, onKeyUp) {
|
||||
const { keyEmitter } = useContext(KeyboardContext);
|
||||
useEffect(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user