From f2193302c12ee247474ee467edcfc7e91f74a847 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 12 Jan 2023 18:26:21 +0000 Subject: [PATCH 1/2] Prevent mute event spam from key repeats --- src/useKeyboardShortcuts.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/useKeyboardShortcuts.ts b/src/useKeyboardShortcuts.ts index b9d69ec..6356b52 100644 --- a/src/useKeyboardShortcuts.ts +++ b/src/useKeyboardShortcuts.ts @@ -43,13 +43,14 @@ export function useKeyboardShortcuts( toggleMicrophoneMuted(); } else if (event.key == "v") { toggleLocalVideoMuted(); - } else if (event.key === " ") { + } else if (event.key === " " && !spacebarHeld) { setSpacebarHeld(true); setMicrophoneMuted(false); } }, [ enabled, + spacebarHeld, toggleLocalVideoMuted, toggleMicrophoneMuted, setMicrophoneMuted, From 1b08a5cac33348d2eebe6081582019ba6db02a20 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 13 Jan 2023 11:56:29 +0000 Subject: [PATCH 2/2] Rename file --- src/{useKeyboardShortcuts.ts => useCallViewKeyboardShortcuts.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{useKeyboardShortcuts.ts => useCallViewKeyboardShortcuts.ts} (100%) diff --git a/src/useKeyboardShortcuts.ts b/src/useCallViewKeyboardShortcuts.ts similarity index 100% rename from src/useKeyboardShortcuts.ts rename to src/useCallViewKeyboardShortcuts.ts