Something went wrong. Try again.
A local-first note taking app
Something went wrong. Try again.
TypeScript
1234567891011121314151617181920212223import { ActionRegistry } from './registry';import { HotkeyManager } from './hotkey-manager';import { HotkeyStore } from './hotkeyStore';
/** * Create the core action system services. * * Call this once at app startup (e.g. in AppShell via useMemo) and pass * the returned services into ActionProvider. * * @param isMac - Whether the renderer is on macOS (determines Mod expansion) */export function createActionServices(isMac: boolean) { const registry = new ActionRegistry(); const hotkeyStore = new HotkeyStore();
const hotkeyManager = new HotkeyManager(registry, isMac, (actionId) => { void registry.execute(actionId); });
return { registry, hotkeyManager, hotkeyStore };}