Skip to content

v2.1.1: 修复默认听写快捷键失效

Choose a tag to compare

@github-actions github-actions released this 25 Aug 03:13

紧急修复 v2.1.0 引入的回归:默认听写键(右 Command)按下毫无反应。

🐛 Bug 修复

  • 默认的按住说话快捷键——右 Command,以及一切「单修饰键」(左/右 Shift、Option、Control、Fn)——恢复可用。v2.1.0 为区分左右同位修饰键,给这类键的按下判定加了一道实时 CGEventSource.keyState 读取,但该读取在事件 tap 内对修饰键并不可靠,导致按键始终被判定为「未按下」、毫无反应;而普通组合键(如 Command+0)走的是另一条未受影响的路径,仍然正常。此版本将判定逻辑逐字回退到 v2.1.0 之前经过长期验证的实现。
  • 说明:v2.1.0 的自动化测试之所以没能拦住这个回归,是因为失败发生在实时事件 tap 的运行时行为上,而非可被单元测试覆盖的纯逻辑;对应的伪测试已删除。左右同位修饰键那个边角问题暂列为已知限制,后续用更稳妥的方式(读取事件自带的设备相关修饰位)修复。

v2.1.1: Fix the default dictation hotkey doing nothing

An urgent fix for a v2.1.0 regression: pressing the default dictation key (Right Command) did nothing.

🐛 Bug fixes

  • The default push-to-talk hotkey — Right Command, and every other modifier-only key (left/right Shift, Option, Control, Fn) — works again. To disambiguate the left and right keys that share one modifier bit, v2.1.0 added a live CGEventSource.keyState read to the press decision for these keys, but inside the event tap that read does not reliably reflect a modifier key's state, so the key was always judged "not pressed" and nothing happened; regular combo keys (e.g. Command+0) took a different, unaffected path and kept working. This release reverts the decision verbatim to the long-proven pre-v2.1.0 implementation.
  • Note: v2.1.0's automated tests did not catch this because the failure is in the live event-tap runtime behavior, not in unit-testable pure logic; the misleading test that gave false confidence has been removed. The left/right same-modifier edge case is a documented known limitation for now, to be fixed later by reading the device-specific modifier bit carried on the event itself.