Repository navigation
Description
Summary
Windows → Mac mouse sharing never works on 2.5.0, while Mac → Windows works fine in the same session.
Kvm.connected on Windows evaluates to false forever, so driveOther is never enabled: the helper never watches the screen edge, and kvm.displays is never sent to the other side (the Mac draws this two-monitor PC as a single dashed placeholder screen).
Environment
| Windows | 11 Insider, build 10.0.26340.9767, x64 |
| macOS | 27, arm64 |
| DuoDesk | 2.5.0 on both sides, installed from the GitHub release |
| Network | Same LAN, paired, both sides show "Connected" (2 ms) |
| Monitors | Windows: 2 (2560x1600 + 3440x1440). Mac: 2 |
| Mode | home, mouse + keyboard switches on, both directions on |
Steps to reproduce
- Pair a Windows PC and a Mac, both on 2.5.0.
- On Windows, turn on both switches on the Mouse page (and in the tray menu).
- Set the KVM direction to Windows → Mac and pick the side the Mac sits on.
- Push the cursor hard against that edge (a second or two of dwelling).
Expected
The cursor crosses onto the Mac.
Actual
- The cursor just stops at the edge. No edge hint appears at all — the helper never reports
edge. - Mac → Windows keeps working normally.
- On the Mac side, this PC is shown with one dashed placeholder screen although it has two monitors.
- Tried with a single monitor, with the other direction, after re-pairing, after a reboot, with the keyboard/mouse switches toggled — no change.
Root cause
resources/app/windows/kvm.js (Kvm.connected):
get connected() {
return this.link.status.state === 'connected' && this.link.authed;
}After the 2.5.0 refactor this.link is a Peer (resources/app/windows/peer.js), not a Link. Peer exposes status (getter, peer.js:138) but has no authed of its own — authed belongs to the Link underneath (Peer.link.authed, set in windows/link.js:46 and :384). So this.link.authed is always undefined and connected is always false.
The rest follows from that one line:
_canDrivestays false →kvmConfigis sent withdriveOther: false- the helper never arms
watchEdge, so pushing the edge produces nothing (noedge, not evenedgeNote) - the display list is never pushed, so the other side cannot lay out this PC's two monitors
Verified against a live process: 'authed' in peer === false, kvm.connected === undefined.
Suggested fix
get connected() {
const peer = this.link;
const authed = peer.authed ?? peer.link?.authed; // Peer -> Link
return peer.status.state === 'connected' && authed !== false;
}(authed !== false keeps the hosting case connected, where Peer.status is synthesised and there is no Link.authed to read.)
Verification
With only that line and the ui-device fix below applied, mouse sharing works in both directions:
[kvm] applyConfig connected=true driving=true cfgDriveOther=true side=left zones=0.1436-1.0000 theirs=2
[kvm] edge ACCEPTED offset=0.6282
[kvm] edge ACCEPTED offset=0.2053
[kvm] moves 13~23/s
On the Mac side: 1x kvm.displays, 1x kvm.take, ~2900 mouse-move messages, 47 key messages, 4 wheel messages.
The helper itself is fine — driven directly with the patched config it behaves correctly on the very same build:
kvmConfig {side:'left', driveOther:true, zones:null}
-> edge {"event":"edge","offset":0.9181}
kvmConfig {side:'left', driveOther:true, zones:'none'}
-> edgeNote {"reason":"outsideZone"}
helper self-report: monitors="[0,0 2560x1600* | 0,-1440 3440x1440]"
So this is not a permission, firewall, pairing or zone problem — nothing reaches the helper because connected is false.
Second (minor) bug in the same build
resources/app/shared/ui-device.js:359
const top = (phone && (ph.top || [])).map(...)When ph.top is present but not an array this throws TypeError: ...map is not a function on every repaint (about twice a second, flooding the log). Suggested:
const top = (phone && (Array.isArray(ph.top) ? ph.top : [])).map(...)Workaround for other users
Until a build with the fix ships, in C:\Program Files\DuoDesk\resources\app\windows\kvm.js (elevated editor) change line 199 from
return this.link.status.state === 'connected' && this.link.authed;to
return this.link.status.state === 'connected' && this.link.authed !== false;and restart DuoDesk. This is what made it work here.
Activity