fix(settings): 选区润色快捷键录制改用通用修饰键,去掉错误的侧键模式 (#962)

上游 #851 给 SelectionPolishSection 开了 sideSpecificModifiers(录制
cmd-left/alt-right 等侧特异性标签),但同一 PR 的后端
set_selection_polish_hotkey 用 reject_side_specific_non_dictation 拒绝
非听写功能的侧键(side-aware hook 仅听写支持多 owner,polish 走普通
global-hotkey 注册)——前后矛盾导致带修饰键的组合保存必然失败,且前端
catch 后误报「该快捷键组合不可用」。

修复:去掉该行的 sideSpecificModifiers,录制回落到通用修饰键格式
(alt/ctrl/shift/super),与后端约束一致。听写快捷键(ShortcutsSection、
RecordingInputSection)的侧键能力不受影响。
This commit is contained in:
aeoform authored and GitHub committed 2026-08-19 22:01:15 +08:00
1 parent 33467a36ea
commit 68573df66e
1 file changed
+4 -1
@@ -38,7 +38,10 @@ export function SelectionPolishSection() {
>
<ShortcutRecorder
value={prefs.selectionPolishHotkey}
sideSpecificModifiers
// 注意:不能开 sideSpecificModifiers —— 后端 set_selection_polish_hotkey 用
// reject_side_specific_non_dictation 拒绝非听写功能的侧键修饰(side-aware hook
// 仅听写支持多 owner),开启会把录制出的 ctrl-left/alt-right 等标签全部打回,
// 前端 catch 后误报「该快捷键组合不可用」(上游 #851 引入的自相矛盾)。
onSave={async binding => {
await setSelectionPolishHotkey(binding);
await refresh();