mirror of https://github.com/jetkvm/kvm.git
refactor: clarify comments in useKeyboard hook for resetKeyboardState function
This commit is contained in:
parent
a2b060b42e
commit
7a96aa3044
|
@ -281,8 +281,7 @@ export default function useKeyboard() {
|
||||||
}, [cancelKeepAlive, sendKeypressKeepAliveHidRpc]);
|
}, [cancelKeepAlive, sendKeypressKeepAliveHidRpc]);
|
||||||
|
|
||||||
// resetKeyboardState is used to reset the keyboard state to no keys pressed and no modifiers.
|
// resetKeyboardState is used to reset the keyboard state to no keys pressed and no modifiers.
|
||||||
// This is useful for macros and when the browser loses focus to ensure that the keyboard state
|
// This is useful for macros, in case of client-side rollover, and when the browser loses focus
|
||||||
// is clean.
|
|
||||||
const resetKeyboardState = useCallback(async () => {
|
const resetKeyboardState = useCallback(async () => {
|
||||||
// Cancel keepalive since we're resetting the keyboard state
|
// Cancel keepalive since we're resetting the keyboard state
|
||||||
cancelKeepAlive();
|
cancelKeepAlive();
|
||||||
|
|
Loading…
Reference in New Issue