diff --git a/src/hooks/useKeyPress.ts b/src/hooks/useKeyPress.ts index 9470cd1a1..ade7d7d36 100644 --- a/src/hooks/useKeyPress.ts +++ b/src/hooks/useKeyPress.ts @@ -6,7 +6,7 @@ export const useKeyPress = (targetKey: string) => { const keyHandler = useCallback( (event: KeyboardEvent) => { event.stopPropagation(); - if (event.key === targetKey || (targetKey === "Space" && event.key === " ")) { + if (event.code === targetKey) { setKeyPressed(event.type === "keydown"); } },