feat(keybinds): add useKeybinds hook with Electron IPC bridge and web fallback

This commit is contained in:
Jannis Braun
2026-03-22 20:35:31 +01:00
parent fb964cc01a
commit c6d345048a
2 changed files with 232 additions and 0 deletions
+7
View File
@@ -52,6 +52,13 @@ interface BackspaceElectronAPI {
// Activity detection (game/app process scanning)
onActivityDetected: (callback: (activity: unknown) => void) => (() => void);
getCurrentActivity: () => Promise<unknown>;
// Keybind support
syncKeybinds: (keybinds: Array<{ actionId: string; keys: number[]; mouseButton?: number }>) => void;
onKeybindAction: (callback: (action: { actionId: string; pressed: boolean }) => void) => (() => void);
onAccessibilityStatus: (callback: (status: { trusted: boolean }) => void) => (() => void);
onKeybindHookError: (callback: (error: { message: string }) => void) => (() => void);
checkAccessibility: () => Promise<boolean>;
}
interface Window {