- {filteredBindings.map((binding) => (
-
-
- }
- onBlur={() => setSelected(null)}
- onChange={() => {}}
- onKeyDownCapture={(e) => {
- if (selected !== (binding as BindingActions)) return;
- handleSetHotkey(binding as BindingActions, e);
- }}
- readOnly
- rightSection={
- {
- setSelected(binding as BindingActions);
- document.getElementById(`hotkey-${binding}`)?.focus();
- }}
- variant="transparent"
+
+ >}
+ description={t('setting.applicationHotkeys', {
+ context: 'description',
+ postProcess: 'sentenceCase',
+ })}
+ title={t('setting.applicationHotkeys', { postProcess: 'sentenceCase' })}
+ />
+
+ {filteredBindings.map((binding) => (
+
+
- }
- style={{
- opacity: selected === (binding as BindingActions) ? 0.8 : 1,
- outline: duplicateHotkeyMap.includes(
- bindings[binding as keyof typeof BINDINGS_MAP].hotkey!,
- )
- ? '1px dashed red'
- : undefined,
- }}
- value={bindings[binding as keyof typeof BINDINGS_MAP].hotkey}
- />
- {isElectron() && (
-
- handleSetGlobalHotkey(binding as BindingActions, e)
- }
- size="md"
- style={{
- opacity: bindings[binding as keyof typeof BINDINGS_MAP]
- .allowGlobal
- ? 1
- : 0,
- }}
- />
- )}
- {bindings[binding as keyof typeof BINDINGS_MAP].hotkey && (
- handleClearHotkey(binding as BindingActions)}
- variant="transparent"
- />
- )}
-
- ))}
-
- >
+ }
+ onBlur={() => setSelected(null)}
+ onChange={() => {}}
+ onKeyDownCapture={(e) => {
+ if (selected !== (binding as BindingActions)) return;
+ handleSetHotkey(binding as BindingActions, e);
+ }}
+ readOnly
+ rightSection={
+ {
+ setSelected(binding as BindingActions);
+ document
+ .getElementById(`hotkey-${binding}`)
+ ?.focus();
+ }}
+ variant="transparent"
+ />
+ }
+ style={{
+ opacity: selected === (binding as BindingActions) ? 0.8 : 1,
+ outline: duplicateHotkeyMap.includes(
+ bindings[binding as keyof typeof BINDINGS_MAP].hotkey!,
+ )
+ ? '1px dashed red'
+ : undefined,
+ }}
+ value={bindings[binding as keyof typeof BINDINGS_MAP].hotkey}
+ />
+ {isElectron() && (
+
+ handleSetGlobalHotkey(binding as BindingActions, e)
+ }
+ size="md"
+ style={{
+ opacity: bindings[binding as keyof typeof BINDINGS_MAP]
+ .allowGlobal
+ ? 1
+ : 0,
+ }}
+ />
+ )}
+ {bindings[binding as keyof typeof BINDINGS_MAP].hotkey && (
+ handleClearHotkey(binding as BindingActions)}
+ variant="transparent"
+ />
+ )}
+
+ ))}
+
+ >
+ }
+ options={options}
+ />
);
};
diff --git a/src/renderer/features/settings/components/hotkeys/hotkeys-tab.tsx b/src/renderer/features/settings/components/hotkeys/hotkeys-tab.tsx
index c1b60b085..90de2fcbd 100644
--- a/src/renderer/features/settings/components/hotkeys/hotkeys-tab.tsx
+++ b/src/renderer/features/settings/components/hotkeys/hotkeys-tab.tsx
@@ -1,14 +1,27 @@
import isElectron from 'is-electron';
+import { Fragment } from 'react/jsx-runtime';
import { HotkeyManagerSettings } from '/@/renderer/features/settings/components/hotkeys/hotkey-manager-settings';
+import { MediaSessionSettings } from '/@/renderer/features/settings/components/hotkeys/media-session-settings';
import { WindowHotkeySettings } from '/@/renderer/features/settings/components/hotkeys/window-hotkey-settings';
+import { Divider } from '/@/shared/components/divider/divider';
import { Stack } from '/@/shared/components/stack/stack';
+const sections = [
+ { component: WindowHotkeySettings, hidden: !isElectron(), key: 'window' },
+ { component: MediaSessionSettings, key: 'media-session' },
+ { component: HotkeyManagerSettings, key: 'hotkey-manager' },
+];
+
export const HotkeysTab = () => {
return (