MCPcopy
hub / github.com/ZToolsCenter/ZTools / updateShortcut

Method updateShortcut

src/main/api/renderer/settings.ts:225–237  ·  view source on GitHub ↗
(shortcut: string)

Source from the content-addressed store, hash-verified

223
224 // 更新快捷键
225 public updateShortcut(shortcut: string): { success: boolean; error?: string } {
226 try {
227 const success = updateShortcut(shortcut)
228 if (success) {
229 return { success: true }
230 } else {
231 return { success: false, error: '快捷键已被占用' }
232 }
233 } catch (error: unknown) {
234 console.error('[Settings] 更新快捷键失败:', error)
235 return { success: false, error: error instanceof Error ? error.message : '未知错误' }
236 }
237 }
238
239 // 获取当前快捷键
240 private getCurrentShortcut(): string {

Callers 2

setupIPCMethod · 0.95
setupIPCMethod · 0.80

Calls 1

updateShortcutFunction · 0.85

Tested by

no test coverage detected