Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more
PR comment and fixes
altic-dev17dceb78a5d0
diff --git a/Sources/Fluid/Services/GlobalHotkeyManager.swift b/Sources/Fluid/Services/GlobalHotkeyManager.swiftindex 9612e645..7f0e5fc5 100644--- a/Sources/Fluid/Services/GlobalHotkeyManager.swift+++ b/Sources/Fluid/Services/GlobalHotkeyManager.swift@@ -17,15 +17,20 @@ final class GlobalHotkeyManager: NSObject {private var rewriteModeCallback: (() async -> Void)?private var cancelCallback: (() -> Bool)? // Returns true if handledprivate var pressAndHoldMode: Bool = SettingsStore.shared.pressAndHoldMode- private var isKeyPressed = false- private var isCommandModeKeyPressed = false- private var isRewriteKeyPressed = false+ // These state flags are accessed from CGEvent tap callback (may run off main thread)+ // and @MainActor tasks. Marked nonisolated(unsafe) since they're simple booleans+ // with effectively atomic reads/writes, and the event tap runs on main run loop.+ private nonisolated(unsafe) var isKeyPressed = false+ private nonisolated(unsafe) var isCommandModeKeyPressed = false+ private nonisolated(unsafe) var isRewriteKeyPressed = false// Modifier-only shortcut tracking: detect if another key was pressed during modifier hold- private var modifierOnlyKeyDown = false- private var otherKeyPressedDuringModifier = false+ private nonisolated(unsafe) var modifierOnlyKeyDown = false+ private nonisolated(unsafe) var otherKeyPressedDuringModifier = false+ // Reserved for future tap-vs-hold timing detection (e.g., quick tap to toggle vs long hold)private var modifierPressStartTime: Date?- private var pendingHoldModeStart: Task<Void, Never>?+ private nonisolated(unsafe) var pendingHoldModeStart: Task<Void, Never>?+ // Tracks which mode's pending start is active (for cancellation on key combos)private var pendingHoldModeType: HoldModeType?private enum HoldModeType {diff --git a/Sources/Fluid/Views/NotchContentViews.swift b/Sources/Fluid/Views/NotchContentViews.swiftindex b602aab6..561b57ba 100644--- a/Sources/Fluid/Views/NotchContentViews.swift+++ b/Sources/Fluid/Views/NotchContentViews.swift@@ -341,10 +341,11 @@ struct NotchExpandedView: View {}.padding(.horizontal, 8).padding(.vertical, 6)+ .background(Color.black).cornerRadius(8).overlay(RoundedRectangle(cornerRadius: 8)- .stroke(Color.white.opacity(0.00), lineWidth: 1)+ .stroke(Color.white.opacity(0.12), lineWidth: 1)).onHover { hovering inself.handlePromptHover(hovering)