Skip to content

All your computers and your phone/iPhone, working as one desk. Screens, apps, files, clipboard, calls, texts, notifications, mouse and keyboard, shared between Mac, Windows, Linux , Android, Web and ios / ipados . Free and open source. No account, no cloud, and no shared network needed.

synthetic-mods test: releaseAll leaves the ordinary keys to stopCapture's own release (#397)

inukaasith58a5e8576a88
diff --git a/mac-helper/test/synthetic-mods.swift b/mac-helper/test/synthetic-mods.swift
index c307893d..7daac506 100644
--- a/mac-helper/test/synthetic-mods.swift
+++ b/mac-helper/test/synthetic-mods.swift
@@ -96,7 +96,7 @@ struct SyntheticModsTest {
remote = [0x3B, 0x0D]
let rel = sm.releaseAll(remoteDown: &remote)
precondition(doms(rel) == ["u:ControlLeft"])
- precondition(remote.isEmpty)
+ precondition(remote == [0x0D]) // only the synthesized modifier: the key itself goes with stopCapture's own release
sm.reset()
remote = []
precondition(sm.releaseAll(remoteDown: &remote).isEmpty)
@@ -182,7 +182,7 @@ struct SyntheticModsTest {
remote = [0x37, 0x01, 0x37, 0x02]
let clean = sm.releaseAll(remoteDown: &remote)
precondition(doms(clean).filter { $0.hasPrefix("u:") }.count >= 1)
- precondition(remote.isEmpty)
+ precondition(remote == [0x01, 0x02]) // the keys themselves go with stopCapture's own release
sm.reset()
precondition(sm.releaseAll(remoteDown: &remote).isEmpty)