Skip to content

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

Restore automatic transcript paste after shortcut release (#1193)

Matt Van Horn1bf38dc8a6e5
diff --git a/Tests/FluidDictationIntegrationTests/SpokenSendTests.swift b/Tests/FluidDictationIntegrationTests/SpokenSendTests.swift
index baa18a06..14aa46c7 100644
--- a/Tests/FluidDictationIntegrationTests/SpokenSendTests.swift
+++ b/Tests/FluidDictationIntegrationTests/SpokenSendTests.swift
@@ -348,10 +348,12 @@ final class SpokenSendTests: XCTestCase {
])
// Modifier presses are flagsChanged events, exactly like a physical Command key.
XCTAssertEqual(events.map(\.type), [.flagsChanged, .keyDown, .keyUp, .flagsChanged])
- XCTAssertTrue(events[0].flags.contains(.maskCommand))
- XCTAssertTrue(events[1].flags.contains(.maskCommand))
- XCTAssertTrue(events[2].flags.contains(.maskCommand))
- XCTAssertFalse(events[3].flags.contains(.maskCommand), "the final event must release Command")
+ // Command has to be the only modifier. A leaked Shift, Option, Control, or Fn
+ // turns Cmd+V into a different shortcut, and a bare V is what inserts "v".
+ XCTAssertEqual(events[0].flags, .maskCommand)
+ XCTAssertEqual(events[1].flags, .maskCommand)
+ XCTAssertEqual(events[2].flags, .maskCommand)
+ XCTAssertEqual(events[3].flags, CGEventFlags(), "the final event must release Command")
}
func testPasteSequenceIsInvisibleToTheHotkeyTap() throws {