feat: 快捷键录入重绑(FR-K3,keymap:load/save IPC+config.json,SettingsPanel 录入 UI+冲突检测,use-hotkeys 读 store 实时生效,重开恢复)

This commit is contained in:
hunter-dev
2026-08-24 23:48:17 +08:00
parent cf2600901b
commit 49c174851e
9 changed files with 166 additions and 36 deletions
+4
View File
@@ -29,6 +29,8 @@ export const IPC = {
printPdf: 'doc:print-pdf',
appearanceLoad: 'appearance:load',
appearanceSave: 'appearance:save',
keymapLoad: 'keymap:load',
keymapSave: 'keymap:save',
} as const;
export type IpcChannel = (typeof IPC)[keyof typeof IPC];
@@ -58,6 +60,8 @@ export interface IpcMap {
[IPC.printPdf]: { args: void; result: void };
[IPC.appearanceLoad]: { args: void; result: { themeId: string; params: Record<string, unknown>; effect: string } | null };
[IPC.appearanceSave]: { args: { themeId: string; params: Record<string, unknown>; effect: string }; result: void };
[IPC.keymapLoad]: { args: void; result: { id: string; combo: string }[] | null };
[IPC.keymapSave]: { args: { id: string; combo: string }[]; result: void };
}
// 类型安全的 invoke 帮助器签名(preload 暴露 + 渲染层使用)