()
| 446 | |
| 447 | // 获取当前配置的快捷键 |
| 448 | const getConfiguredHotkeyParts = () => { |
| 449 | // 如果选择了自定义快捷键,使用自定义的 |
| 450 | const hotkeyString = config.floatingBallHotkey === 'custom' |
| 451 | ? config.customFloatingBallHotkey |
| 452 | : config.floatingBallHotkey; |
| 453 | |
| 454 | if (!hotkeyString || hotkeyString === 'none') { |
| 455 | return []; |
| 456 | } |
| 457 | |
| 458 | return hotkeyString.split('+').map(key => { |
| 459 | const k = key.toLowerCase(); |
| 460 | // 标准化修饰键名称 |
| 461 | if (k === 'ctrl') return 'control'; |
| 462 | if (k === 'option') return 'alt'; |
| 463 | return k; |
| 464 | }); |
| 465 | }; |
| 466 | |
| 467 | if (isDev) { |
| 468 | console.log(`[FluentRead] 设置悬浮球快捷键: ${config.floatingBallHotkey}, 系统: ${isMac ? 'macOS' : '其他'}`); |
no outgoing calls
no test coverage detected