mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Prevent mute event spam from key repeats
This commit is contained in:
parent
9ba4ce429f
commit
f2193302c1
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user