mirror of
https://github.com/element-hq/element-call.git
synced 2026-11-12 09:37:43 +00:00
Prevent mute event spam from key repeats
This commit is contained in:
1 parent
9ba4ce429f
commit
f2193302c1
1 file changed
+2
-1
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user