diff --git a/src/renderer/features/settings/components/hotkeys/hotkey-manager-settings.tsx b/src/renderer/features/settings/components/hotkeys/hotkey-manager-settings.tsx index 7238a5d61..d06de5bd0 100644 --- a/src/renderer/features/settings/components/hotkeys/hotkey-manager-settings.tsx +++ b/src/renderer/features/settings/components/hotkeys/hotkey-manager-settings.tsx @@ -266,97 +266,102 @@ export const HotkeyManagerSettings = memo(() => { />
- {filteredBindings.map((binding) => ( - - - {BINDINGS_MAP[binding as keyof typeof BINDINGS_MAP]} - - - } - 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(); + + {filteredBindings.map((binding) => ( + + + {BINDINGS_MAP[binding as keyof typeof BINDINGS_MAP]} + + + } + 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" /> - } - 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" - /> - - )} - - ))} + + )} + + ))} +