From 7a96aa3044cd5c706c6aced4e739efd31f64002e Mon Sep 17 00:00:00 2001 From: Adam Shiervani Date: Thu, 18 Sep 2025 11:13:56 +0200 Subject: [PATCH] refactor: clarify comments in useKeyboard hook for resetKeyboardState function --- ui/src/hooks/useKeyboard.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/src/hooks/useKeyboard.ts b/ui/src/hooks/useKeyboard.ts index d2d289cf..8f2ae2d2 100644 --- a/ui/src/hooks/useKeyboard.ts +++ b/ui/src/hooks/useKeyboard.ts @@ -281,8 +281,7 @@ export default function useKeyboard() { }, [cancelKeepAlive, sendKeypressKeepAliveHidRpc]); // 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 - // is clean. + // This is useful for macros, in case of client-side rollover, and when the browser loses focus const resetKeyboardState = useCallback(async () => { // Cancel keepalive since we're resetting the keyboard state cancelKeepAlive();