app-engine: protocol §10.6, the lane README and TODO §6
§10.6 records six things the Windows source says that §1-§9 did not: that a switch moves the pointer only when the target is the local machine (Helper.cs:75-127), that a Mouse packet addressed to us takes control back by assignment rather than by switching (Receiver.cs:122-125), that relative mode puts the edge detection on the controlled machine (Receiver.cs:147-172), that the reconnect countdown is 30 s and gated on "no socket established" (frmScreen.cs:425-449), the exact JSON shapes of the settings file, and why Heartbeat has to be a 64-byte packet. The README's Handshakes section now documents the API as shipped, six deliberate deviations, the answers to all eleven open requests from lanes 3-5, and four new requests: PacketSequencer is used from two queues and is not thread-safe (session-matrix), PermissionState has no public initialiser and Cursor publishes no pointer position (input-capture), and there is no way to send a Heartbeat on demand (control-channel). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
1 parent
c4741fcfeb
commit
fc7a54b40a
5 files changed
+464
-108
No files matched your search
@@ -5,7 +5,7 @@
|
||||
// Ported from App/Core/MachineStuff.cs `SwitchToMachine` (1008-1028) and
|
||||
// `SwitchToMultipleMode` (1030-1050), App/Core/Helper.cs `HelperThread`
|
||||
// (73-127), App/Class/InputHook.cs `ProcessHotKeys` (516-621) and `Switch2`
|
||||
// (623-655), App/Core/InitAndCleanup.cs `ReleaseAllKeys` (214-243).
|
||||
// (626-655), App/Core/InitAndCleanup.cs `ReleaseAllKeys` (214-243).
|
||||
|
||||
import AppKit
|
||||
import Foundation
|
||||
@@ -126,14 +126,14 @@ extension Engine {
|
||||
}
|
||||
}
|
||||
|
||||
/// `Switch2` (`InputHook.cs:623-655`): release everything, then hand control
|
||||
/// `Switch2` (`InputHook.cs:626-655`): release everything, then hand control
|
||||
/// to the machine in that matrix slot. An empty slot does nothing.
|
||||
public func switchTo(slot: Int) {
|
||||
let names = switcher.matrix.names
|
||||
guard slot >= 0, slot < names.count else { return }
|
||||
let name = names[slot].trimmingCharacters(in: .whitespaces)
|
||||
guard !name.isEmpty else { return }
|
||||
injector.releaseAll() // InputHook.cs:632
|
||||
injector.releaseAll() // InputHook.cs:635
|
||||
perform(switcher.switchToMachine(named: name, now: EventTap.now()))
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ extension Engine {
|
||||
forwardLockChord(to: des)
|
||||
}
|
||||
|
||||
/// A double press (`InputHook.cs:546-566`): broadcast the chord to everyone,
|
||||
/// A double press (`InputHook.cs:544-566`): broadcast the chord to everyone,
|
||||
/// come back out of ALL mode, then lock this Mac too.
|
||||
public func lockAll() {
|
||||
perform(switcher.switchToBroadcast(true, centerCursor: true))
|
||||
|
||||
Reference in new issue
Block a user