+
+
+ {item.title}
+ {modified ? (
+
+ Modified
+
+ ) : null}
+ {terminalStatus ? (
- {
- if (recording) {
- return
- }
- onStartRecording(item.id)
- }}
- onKeyDown={handleRecordKeyDown}
- className={cn(
- 'text-muted-foreground hover:text-foreground',
- recording &&
- 'border border-ring bg-accent text-accent-foreground ring-[3px] ring-ring/30'
- )}
+
-
-
+
+ {terminalStatus.label}
+
- {recording ? 'Listening for shortcut' : 'Change shortcut'}
+ {terminalStatus.description}
+ ) : null}
+
+ {helperMessage ? (
+
+ {helperMessage}
+
+ ) : null}
+
+
+
+ {/* Reset/Disable reveal on hover or keyboard focus to keep the row calm;
+ they stay reachable via focus-within for keyboard users. */}
+ {hasBinding ? (
+
+ {modified ? (
+
+
+ onReset(item.id)}
+ >
+
+
+
+
+ Reset to default
+
+
+ ) : null}
onDisable(item.id)}
>
@@ -229,28 +189,58 @@ export function ShortcutBindingRow({
- Disable
-
-
-
-
- onReset(item.id)}
- >
-
-
-
-
- Reset
+ Disable shortcut
-
-
+ ) : null}
+
+
+
+ {
+ if (!recording) {
+ onStartRecording(item.id)
+ }
+ }}
+ onKeyDown={handleRecordKeyDown}
+ className={cn(
+ 'flex min-h-7 min-w-[5.5rem] items-center justify-center gap-1.5 rounded-md border px-2 py-1 text-xs outline-none transition-colors focus-visible:ring-[3px] focus-visible:ring-ring/50',
+ recording
+ ? 'border-ring bg-accent text-accent-foreground ring-[3px] ring-ring/30'
+ : hasBinding
+ ? 'border-transparent hover:border-border/70 hover:bg-background'
+ : 'border-dashed border-border/70 text-muted-foreground hover:border-border hover:text-foreground'
+ )}
+ >
+ {recording ? (
+ Press keys…
+ ) : hasBinding ? (
+
+ {effective.map((binding) => (
+
+ ))}
+
+ ) : (
+
+
+ Add shortcut
+
+ )}
+
+
+
+ {recording ? 'Listening for shortcut' : hasBinding ? 'Change shortcut' : 'Add shortcut'}
+
+
+
)
}
diff --git a/src/renderer/src/components/settings/ShortcutFilterRail.tsx b/src/renderer/src/components/settings/ShortcutFilterRail.tsx
index d60a8cf45..f588688d6 100644
--- a/src/renderer/src/components/settings/ShortcutFilterRail.tsx
+++ b/src/renderer/src/components/settings/ShortcutFilterRail.tsx
@@ -23,12 +23,6 @@ export type ShortcutRowsByGroup = {
rows: ShortcutRowModel[]
}
-export type ShortcutGroupSummary = {
- id: string
- label: string
- count: number
-}
-
const SHORTCUT_FILTER_LABELS: Record
= {
all: 'All',
modified: 'Modified',
@@ -80,10 +74,7 @@ export function ShortcutFilterRail({
onQueryChange,
filter,
onFilterChange,
- activeGroup,
- onActiveGroupChange,
filterCounts,
- groupSummaries,
visibleCount,
totalCount
}: {
@@ -91,10 +82,7 @@ export function ShortcutFilterRail({
onQueryChange: (value: string) => void
filter: ShortcutFilter
onFilterChange: (value: ShortcutFilter) => void
- activeGroup: string
- onActiveGroupChange: (value: string) => void
filterCounts: Record
- groupSummaries: ShortcutGroupSummary[]
visibleCount: number
totalCount: number
}): React.JSX.Element {
@@ -162,34 +150,6 @@ export function ShortcutFilterRail({
))}
-
-