知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.
Swift androidlinuxlive-captionsmacosmeeting-notesmenubar-appsimultaneous-interpretationspeech-recognitionsubtitlesswiftswiftuitranslationwindows
chore: the log says when the left ⌥ was pressed instead of the right one, the talk key
wquguru76ff07ec2a95
diff --git a/Sources/Cicada/Shortcuts.swift b/Sources/Cicada/Shortcuts.swiftindex 186ac7d..e1d430e 100644--- a/Sources/Cicada/Shortcuts.swift+++ b/Sources/Cicada/Shortcuts.swift@@ -235,7 +235,11 @@ final class RightOptionKey {if let tap { CGEvent.tapEnable(tap: tap, enable: true) }case .flagsChanged:let flags = event.flags.rawValue- let isRight = event.getIntegerValueField(.keyboardEventKeycode) == Int64(kVK_RightOption)+ let code = event.getIntegerValueField(.keyboardEventKeycode)+ let isRight = code == Int64(kVK_RightOption)+ // "I held ⌥ and nothing happened" was the left one (or a keyboard or remote session+ // that only sends it): say so in the log.+ if code == Int64(kVK_Option), flags & 0x20 != 0 { debugLog("right option: left ⌥ pressed, not the talk key") }if isRight, flags & RightOptionKey.rightAlt != 0 {// Only a clean press starts talking, not ⌘ + right ⌥ and the like.if !active, flags & RightOptionKey.otherModifiers == 0 { active = true; onDown?() }