mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-28 19:27:50 +00:00
wip introduce shortcut to raise hand
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
|||||||
closeLowerHandToasts,
|
closeLowerHandToasts,
|
||||||
showLowerHandToast,
|
showLowerHandToast,
|
||||||
} from '@/features/notifications/utils'
|
} from '@/features/notifications/utils'
|
||||||
|
import { useRegisterKeyboardShortcut } from '@/features/shortcuts/useRegisterKeyboardShortcut'
|
||||||
|
|
||||||
const SPEAKING_DETECTION_DELAY = 3000
|
const SPEAKING_DETECTION_DELAY = 3000
|
||||||
|
|
||||||
@@ -24,6 +25,12 @@ export const HandToggle = () => {
|
|||||||
const speakingTimerRef = useRef<NodeJS.Timeout | null>(null)
|
const speakingTimerRef = useRef<NodeJS.Timeout | null>(null)
|
||||||
const [hasShownToast, setHasShownToast] = useState(false)
|
const [hasShownToast, setHasShownToast] = useState(false)
|
||||||
|
|
||||||
|
const shortcut = {
|
||||||
|
key: 'h',
|
||||||
|
ctrlKey: true,
|
||||||
|
}
|
||||||
|
useRegisterKeyboardShortcut({ shortcut, handler: toggleRaisedHand })
|
||||||
|
|
||||||
const resetToastState = () => {
|
const resetToastState = () => {
|
||||||
setHasShownToast(false)
|
setHasShownToast(false)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user