6
LAN
Anatolii Hrynchuk edited this page 2026-11-12 11:51:08 +02:00

KSwitcher computers — v0.6.63

English | Українська · Home

Launch as administrator

On the receiving PC, enable both startup options if LAN input stops in an already open elevated app such as Task Manager. From v0.6.68, opening the regular KSwitcher after exiting a development build requests elevation when needed. Confirm any UAC prompt shown on the secure desktop directly on that PC.

Mouse profiles on the receiving PC

Starting with v0.6.67, forwarded mouse buttons and wheel events use the mouse profiles on the PC under the pointer. Update that PC from the tray menu and save its actions under Settings → Mouse.

Automatic connection and help — v0.6.63

Update both PCs through the tray Update command for all three methods. Input sharing must be enabled on both. The normal TCP direction is tried first; the opposite PC tries reverse TCP after 1.5 seconds. Without authenticated TCP after 5 seconds, KSwitcher negotiates encrypted UDP on the existing discovery socket. No third port or internet relay is involved. A working UDP session stays on UDP until disconnection; the status names the selected transport.

UDP uses fresh authenticated sessions, directional AES-256-GCM encryption, ordered event numbers, acknowledgements and bounded retries. Lost, reordered or duplicated packets do not duplicate key presses. Two seconds without authenticated traffic or acknowledgement progress ends the session and returns control locally. The original TCP protocol remains compatible with v0.6.57+; both sides need v0.6.63 for all fallbacks. Automated fallback tests cover blocked TCP directions, UDP loss/reorder/replay/tampering and reconnects; the new fallback implementation has not yet been tested on two physical PCs.

Pairing shows the target and remaining seconds. The code stays available during waiting and after cancellation/timeout for retry, and clears after trust is saved. Network settings save immediately; the main Save button correctly stays disabled when no main settings changed. A saved pair is not yet a working input connection.

After 15 seconds without a connection, the status points to Connection help. Check input sharing on both PCs. If needed, open that help on each PC, use Copy command, and run that PC's own command in administrator PowerShell. Commands target the actual resident KSwitcher executable and allow inbound TCP 45884 and UDP 45883 only from the local subnet. They are never run automatically. KSwitcher keeps retrying, so no new pairing or restart is needed after the permission change.

A firewall rule can depend on the EXE path, so moving the program may require a new rule. Do not assume every timeout is a firewall block. No fallback can guarantee a connection when all network paths are blocked.

Experimental LAN mouse, keyboard and clipboard sharing runs inside the resident KSwitcher process. Discovery is disabled by default. Update ALL participating PCs to v0.6.63: input protocol v2 cannot connect to older one-pair builds. Use Update in the tray menu; preserve each computer's own data directory.

Pair and arrange computers

  1. Open Settings → Tools → KSwitcher computers and enable discovery on every PC. Only running, enabled KSwitcher instances appear.
  2. Match names and instance IDs. Generate a code once, enter the same code on both PCs, select each other and click Pair on both within two minutes. Saved pairs display Pair saved with input connected, input disabled here, computer offline or input not connected. Background identity checks do not flash the label. Pair and code controls are disabled for an existing pair.
  3. Pair every physical input source with all destinations it should control. To control from any PC, pair every pair of PCs. Drag small monitors into neighboring grid cells, or select a monitor and use arrow keys. The local PC is fixed; occupied cells cannot be overwritten. Arrange the same physical layout relative to each PC; layouts do not synchronize automatically.
  4. Click Enable input sharing on every PC. This enables all paired connections, independently of the list selection. The button disables while sharing is enabled; Stop input sharing turns it off. Stop competing mouse/keyboard routers before testing.
  5. Move through the outer screen edge toward a neighboring cell with all keys/buttons released. Keyboard follows the mouse. A → B → C routes directly from physical source A to C; B does not relay injected events. Cross back through B to return to A. Left/right/above/below work; empty cells, diagonal-only and offline neighbors block passage.

Example: for A → B → C, on A place B at (1,0), C at (2,0); on B place A at (-1,0), C at (1,0); on C place A at (-2,0), B at (-1,0).

Ctrl+Alt+Esc is emergency return. Local physical input on a receiving PC also takes control back. Connection loss, suspension, secure desktop, disabling input/discovery or forgetting the controlled pair releases remote keys/buttons and restores local control. Independent peer connections reconnect automatically after restart; a disconnected neighbor does not drop other peers. Closing settings does not stop sharing. LAN changes save immediately, separately from main Settings Save.

Source cursor parking and return preserve the relevant screen edge. Motion scales for monitor DPI. Modifier chords are forwarded with matching releases; generated corrections do not take over remote control. Pending wheel events coalesce; reversal replaces undelivered scrolling in the old direction. Shortcut latches reset when ownership changes.

Clipboard and history

New text, HTML/RTF and images, including screenshots, go to every available paired instance, enter its history and become the active clipboard for Ctrl+V. Discovery must be enabled; input sharing need not be enabled. If the receiver copied something newer during transfer, the received item remains in history without replacing that newer local clipboard. Image transport sends one lossless PNG, reconstructing paste formats on receipt.

Clipboard history shows the source computer. Computers: All opens a checkbox list supporting several sources; the filter persists and only changes the displayed history, not recipients. Files and local file paths are not transferred. Old history is not backfilled to offline PCs. A network item is limited to 32 MiB; configured history limits still apply.

Network, storage and limitations

Discovery: private IPv4/link-local UDP 45883. Input: TCP 45884 or encrypted UDP 45883. Clipboard uses encrypted reliable chunks on discovery UDP, with bounded queues, retries, duplicate/replay protection and no rebroadcast of received entries. Allow KSwitcher through the private-network firewall. Separate VLANs, blocked broadcasts and IPv6-only discovery are unsupported.

Pairing uses a generated 128-bit code and mutual HMAC-SHA256 proof. Input uses fresh directional AES-256-GCM sessions; the PSK channel has no forward secrecy. Identity, trust, enablement and grid positions are DPAPI-protected in data/lan-pairing.bin, excluded from OpenBao/export. Never copy another PC's data folder. Forget on both sides for bilateral trust removal. Disabled discovery has no LAN socket/worker.

Each tile represents the whole virtual desktop, not each physical monitor. Entry position maps proportionally across resolutions. Irregular desktop bounds may have inaccessible gaps. Cross-PC dragging, remote secure desktops/UAC and Ctrl+Alt+Delete are unsupported. Elevated apps require suitable privileges. Raw-input games and special device keys need separate testing.

Automated validation covers three real TCP hubs on loopback, simulated three-desktop routes, reconnection, modifiers, DPI, bounded cursor positioning, clipboard packet loss/replay and native UI layout. Two-PC development use was reported working; three physical PCs have not been validated together.

Connection troubleshooting — v0.6.63

The list refreshes automatically every second while open. Saved pairing means trust; input connected means a ready authenticated input channel. Missing discovery announcements no longer close listeners or working authenticated connections; the last known address is retained for reconnecting. After restart, a dialing client may still need discovery to learn the address. Protocol compatibility with v0.6.57 is unchanged; update both sides for all fixes.

If the name is unchanged but the ID differs, check which program copy and data folder are running. This is a different instance: pair it again using one generated code on both PCs. Do not paste diagnostic commands into the pairing-code field. Do not delete data during normal updates.

If connection does not recover, check input enablement on both PCs and the log: it records channel state changes and the Windows error when opening the TCP listener fails. Connecting alone does not establish that a firewall is blocking traffic.

v0.6.63 test fixture: discovery and input are disabled. Connection help is available below.

LAN setup v0.6.63