mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 01:38:44 +00:00
reducing wasd onboarding helper close delay
This commit is contained in:
1 parent
f93441084f
commit
d554abe5d4
1 file changed
+2
-2
@@ -9,12 +9,12 @@ export const OnboardingHelper = () => {
|
||||
useEffect(() => {
|
||||
const handleKeyDown = (event: KeyboardEvent) => {
|
||||
if (["W", "A", "S", "D"].includes(event.key.toUpperCase())) {
|
||||
setTimeout(() => setKeyPressed(true), 700);
|
||||
setTimeout(() => setKeyPressed(true), 200);
|
||||
}
|
||||
};
|
||||
|
||||
const handleAction = () => {
|
||||
setTimeout(() => setActionPerformed(true), 700);
|
||||
setTimeout(() => setActionPerformed(true), 200);
|
||||
};
|
||||
|
||||
window.addEventListener("keydown", handleKeyDown);
|
||||
|
||||
Reference in new issue
Block a user