(frontend) add Ctrl+Shift+/ to open shortcuts settings

Update toolbar hint and register shortcut to open settings on shortcuts tab
This commit is contained in:
Cyril
2026-03-02 10:10:31 +01:00
parent 85de214ca7
commit 7ebc928dd3
7 changed files with 25 additions and 5 deletions

View File

@@ -31,6 +31,9 @@ import { RecordingProvider } from '@/features/recording'
import { ScreenShareErrorModal } from '../components/ScreenShareErrorModal' import { ScreenShareErrorModal } from '../components/ScreenShareErrorModal'
import { useConnectionObserver } from '../hooks/useConnectionObserver' import { useConnectionObserver } from '../hooks/useConnectionObserver'
import { useNoiseReduction } from '../hooks/useNoiseReduction' import { useNoiseReduction } from '../hooks/useNoiseReduction'
import { useRegisterKeyboardShortcut } from '@/features/shortcuts/useRegisterKeyboardShortcut'
import { settingsStore } from '@/stores/settings'
import { SettingsDialogExtendedKey } from '@/features/settings/type'
import { useVideoResolutionSubscription } from '../hooks/useVideoResolutionSubscription' import { useVideoResolutionSubscription } from '../hooks/useVideoResolutionSubscription'
import { SettingsDialogProvider } from '@/features/settings/components/SettingsDialogProvider' import { SettingsDialogProvider } from '@/features/settings/components/SettingsDialogProvider'
import { useSubtitles } from '@/features/subtitle/hooks/useSubtitles' import { useSubtitles } from '@/features/subtitle/hooks/useSubtitles'
@@ -111,6 +114,14 @@ export function VideoConference({ ...props }: VideoConferenceProps) {
useConnectionObserver() useConnectionObserver()
useVideoResolutionSubscription() useVideoResolutionSubscription()
useRegisterKeyboardShortcut({
id: 'open-shortcuts',
handler: useCallback(() => {
settingsStore.defaultSelectedTab = SettingsDialogExtendedKey.SHORTCUTS
settingsStore.areSettingsOpen = true
}, []),
})
const tracks = useTracks( const tracks = useTracks(
[ [
{ source: Track.Source.Camera, withPlaceholder: true }, { source: Track.Source.Camera, withPlaceholder: true },

View File

@@ -5,6 +5,7 @@ import { Shortcut } from './types'
export type ShortcutCategory = 'navigation' | 'media' | 'interaction' export type ShortcutCategory = 'navigation' | 'media' | 'interaction'
export type ShortcutId = export type ShortcutId =
| 'open-shortcuts'
| 'focus-toolbar' | 'focus-toolbar'
| 'toggle-microphone' | 'toggle-microphone'
| 'toggle-camera' | 'toggle-camera'
@@ -29,6 +30,11 @@ export type ShortcutDescriptor = {
} }
export const shortcutCatalog: ShortcutDescriptor[] = [ export const shortcutCatalog: ShortcutDescriptor[] = [
{
id: 'open-shortcuts',
category: 'navigation',
shortcut: { key: '/', ctrlKey: true, shiftKey: true },
},
{ {
id: 'focus-toolbar', id: 'focus-toolbar',
category: 'navigation', category: 'navigation',

View File

@@ -19,7 +19,10 @@ export const useKeyboardShortcuts = () => {
shiftKey, shiftKey,
altKey, altKey,
}) })
const shortcut = shortcutsSnap.shortcuts.get(shortcutKey) let shortcut = shortcutsSnap.shortcuts.get(shortcutKey)
if (!shortcut && shortcutKey === 'ctrl+shift+?') {
shortcut = shortcutsSnap.shortcuts.get('ctrl+shift+/')
}
if (!shortcut) return if (!shortcut) return
e.preventDefault() e.preventDefault()
await shortcut() await shortcut()

View File

@@ -590,7 +590,7 @@
}, },
"participantTileFocus": { "participantTileFocus": {
"containerLabel": "Optionen für {{name}}", "containerLabel": "Optionen für {{name}}",
"toolbarHint": "F2: zur Symbolleiste unten.", "toolbarHint": "Ctrl+Shift+/: Direkt auf die Tastenkürzel zugreifen.",
"pin": { "pin": {
"enable": "Anheften", "enable": "Anheften",
"disable": "Lösen" "disable": "Lösen"

View File

@@ -590,7 +590,7 @@
}, },
"participantTileFocus": { "participantTileFocus": {
"containerLabel": "Options for {{name}}", "containerLabel": "Options for {{name}}",
"toolbarHint": "F2: go to the bottom toolbar.", "toolbarHint": "Ctrl+Shift+/: access shortcuts directly.",
"pin": { "pin": {
"enable": "Pin", "enable": "Pin",
"disable": "Unpin" "disable": "Unpin"

View File

@@ -590,7 +590,7 @@
}, },
"participantTileFocus": { "participantTileFocus": {
"containerLabel": "Options pour {{name}}", "containerLabel": "Options pour {{name}}",
"toolbarHint": "F2 : raccourci barre d'outils en bas.", "toolbarHint": "Ctrl+Shift+/ : accéder directement aux raccourcis.",
"pin": { "pin": {
"enable": "Épingler", "enable": "Épingler",
"disable": "Annuler l'épinglage" "disable": "Annuler l'épinglage"

View File

@@ -590,7 +590,7 @@
}, },
"participantTileFocus": { "participantTileFocus": {
"containerLabel": "Opties voor {{name}}", "containerLabel": "Opties voor {{name}}",
"toolbarHint": "F2: naar de werkbalk onderaan.", "toolbarHint": "Ctrl+Shift+/: direct toegang tot de sneltoetsen.",
"pin": { "pin": {
"enable": "Pinnen", "enable": "Pinnen",
"disable": "Losmaken" "disable": "Losmaken"