feat: configurable keybindings for push-to-deafen and quick switcher

- Add deafenKey (default M) and quickSwitcherKey (default P) to settingsAtom
- Settings → Calls: Push to Deafen keybind tile using shared useKeyBind hook
- Settings → Keyboard Shortcuts: new section with Quick Room Switcher keybind
- Extract useKeyBind + keyLabel helpers to reduce duplication in Calls section
- CallControls reads deafenKey from settings (reactive, re-registers on change)
- ClientNonUIFeatures reads quickSwitcherKey from settings (same pattern)
- QuickSwitcher now toggles open/closed on repeat press (Ctrl+key again closes)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-03 00:45:43 -04:00
parent 3cbc5112a7
commit 9d4679d260
4 changed files with 107 additions and 40 deletions
+6
View File
@@ -80,6 +80,9 @@ export interface Settings {
nightLightEnabled: boolean;
nightLightOpacity: number;
deafenKey: string;
quickSwitcherKey: string;
}
const defaultSettings: Settings = {
@@ -129,6 +132,9 @@ const defaultSettings: Settings = {
nightLightEnabled: false,
nightLightOpacity: 30,
deafenKey: 'KeyM',
quickSwitcherKey: 'KeyP',
};
export const getSettings = (): Settings => {