From 09f48baefa8d9ef7970fc93d3a8eaa0539de2b8f Mon Sep 17 00:00:00 2001 From: Pas <74743263+Pasithea0@users.noreply.github.com> Date: Fri, 7 Nov 2025 15:44:06 -0700 Subject: [PATCH] disable 0-9 keyboard shortcuts when ctrl or meta is held --- src/components/player/internals/KeyboardEvents.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/player/internals/KeyboardEvents.tsx b/src/components/player/internals/KeyboardEvents.tsx index c2adc925..7ebdfbfe 100644 --- a/src/components/player/internals/KeyboardEvents.tsx +++ b/src/components/player/internals/KeyboardEvents.tsx @@ -265,7 +265,12 @@ export function KeyboardEvents() { dataRef.current.display?.setTime(dataRef.current.time - 1); // Skip to percentage with number keys (0-9) - if (/^[0-9]$/.test(k) && dataRef.current.duration > 0) { + if ( + /^[0-9]$/.test(k) && + dataRef.current.duration > 0 && + !evt.ctrlKey && + !evt.metaKey + ) { const percentage = parseInt(k, 10) * 10; // 0 = 0%, 1 = 10%, 2 = 20%, ..., 9 = 90% const targetTime = (dataRef.current.duration * percentage) / 100; dataRef.current.display?.setTime(targetTime);