refactor runtime deps wiring and docs/config updates

This commit is contained in:
2026-02-10 02:44:35 -08:00
parent 6dd5f4e606
commit bb956d75bf
35 changed files with 372 additions and 1042 deletions

View File

@@ -0,0 +1,24 @@
import { ConfiguredShortcuts } from "../utils/shortcut-config";
import { OverlayShortcutFallbackHandlers, runOverlayShortcutLocalFallback } from "./overlay-shortcut-fallback-runner";
export interface ShortcutUiRuntimeDepsOptions {
getConfiguredShortcuts: () => ConfiguredShortcuts;
getOverlayShortcutFallbackHandlers: () => OverlayShortcutFallbackHandlers;
shortcutMatcher: (
input: Electron.Input,
accelerator: string,
allowWhenRegistered?: boolean,
) => boolean;
}
export function runOverlayShortcutLocalFallbackRuntimeService(
input: Electron.Input,
options: ShortcutUiRuntimeDepsOptions,
): boolean {
return runOverlayShortcutLocalFallback(
input,
options.getConfiguredShortcuts(),
options.shortcutMatcher,
options.getOverlayShortcutFallbackHandlers(),
);
}