diff --git a/src/renderer.ts b/src/renderer.ts index ea7c0dc..1121e69 100644 --- a/src/renderer.ts +++ b/src/renderer.ts @@ -236,14 +236,24 @@ async function init(): Promise { // Ctrl+F (or Cmd+F): focus the VOD filter — only when on the VODs tab. // Browser's default Ctrl+F is suppressed because Electron's renderer - // doesn't have a native find bar anyway. + // doesn't have a native find bar anyway. Route the shortcut to the + // active tab's search/filter input so the user lands in a useful + // place regardless of which tab they happen to be on. if ((e.ctrlKey || e.metaKey) && !e.altKey && !e.shiftKey && (e.key === 'f' || e.key === 'F')) { - const onVodsTab = document.getElementById('vodsTab')?.classList.contains('active'); - if (onVodsTab) { + if (document.getElementById('vodsTab')?.classList.contains('active')) { e.preventDefault(); focusVodFilter(); return; } + if (document.getElementById('archiveTab')?.classList.contains('active')) { + const archiveInput = document.getElementById('archiveSearchQuery') as HTMLInputElement | null; + if (archiveInput) { + e.preventDefault(); + archiveInput.focus(); + archiveInput.select(); + return; + } + } } // Skip rest if user is typing in an input field