From 42ee1396906dcc0fe878efd975f054c128e9f061 Mon Sep 17 00:00:00 2001 From: Miodec Date: Sat, 13 Dec 2025 22:18:40 +0100 Subject: [PATCH] ignore keydowns if tribe test is not active --- frontend/src/ts/input/handlers/keydown.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/src/ts/input/handlers/keydown.ts b/frontend/src/ts/input/handlers/keydown.ts index e15a5a244..813efd2a4 100644 --- a/frontend/src/ts/input/handlers/keydown.ts +++ b/frontend/src/ts/input/handlers/keydown.ts @@ -23,6 +23,7 @@ import { getActiveFunboxesWithFunction, getActiveFunboxNames, } from "../../test/funbox/list"; +import * as TribeState from "../../tribe/tribe-state"; export async function handleTab(e: KeyboardEvent, now: number): Promise { if (Config.quickRestart === "tab") { @@ -144,6 +145,15 @@ async function handleFunboxes( } export async function onKeydown(event: KeyboardEvent): Promise { + if ( + TribeState.getRoom() !== undefined && + TribeState.getState() >= 10 && + TribeState.getState() < 12 + ) { + event.preventDefault(); + return; + } + const now = performance.now(); TestInput.recordKeydownTime(now, event);