MCPcopy Index your code
hub / github.com/ZToolsCenter/ZTools / registerAppShortcut

Method registerAppShortcut

src/main/api/renderer/settings.ts:630–641  ·  view source on GitHub ↗
(shortcut: string, target: string)

Source from the content-addressed store, hash-verified

628
629 // 注册应用快捷键
630 public registerAppShortcut(shortcut: string, target: string): any {
631 try {
632 const success = windowManager.registerAppShortcut(shortcut, target)
633 if (!success) {
634 return { success: false, error: '应用快捷键注册失败' }
635 }
636 return { success: true }
637 } catch (error: unknown) {
638 console.error('[Settings] 注册应用快捷键失败:', error)
639 return { success: false, error: error instanceof Error ? error.message : '未知错误' }
640 }
641 }
642
643 // 注销应用快捷键
644 public unregisterAppShortcut(shortcut: string): any {

Callers 3

setupIPCMethod · 0.95
setupIPCMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected