LogiSwitch on the Mac - start here ================================== 1. Unzip LogiSwitch-1.4.0.zip in Downloads (double-click it). 2. Open Claude on this Mac (Claude Code or the Claude desktop app works best, because it can run the commands itself; a normal Claude chat also works, one command at a time). 3. Copy everything between the lines below and paste it into Claude. ---------------------------------------------------------------------------------------- Help me install and get working "LogiSwitch", my own small tool, on this Mac. The Windows side already works; only the Mac side is missing. The files are in ~/Downloads/LogiSwitch (find the folder if it is somewhere else). Read README.txt there first. My setup: Logitech ERGO K860 keyboard and MX Vertical mouse, paired with this Mac over Bluetooth on Easy-Switch channel 2. My Windows PC is channel 1 and sits to the LEFT of this Mac. What the tool does: - Switches both devices to the PC when I push the cursor against the Mac's LEFT edge (50 ms hold), or when I press the Easy-Switch button on either device (the other follows). It sends the Logitech HID++ 2.0 "Change Host" command (feature 0x1814) over IOKit HID, confirms the device actually left, and re-sends up to 3 times if not. - Optionally shares the plain-text clipboard with the PC. This Mac LISTENS on TCP 51888 and the PC dials out to it (the PC's firewall blocks incoming connections, so it must be this way round). Both directions then use that one connection. Everything is encrypted: AES-256-CBC plus HMAC-SHA256, keys from PBKDF2-SHA256 (200000 rounds) of a shared 16-character pairing code. Clipboard sync is OFF until I turn it on. If you can run commands on this Mac, do the steps yourself. If you cannot, give me one command at a time and ask me to paste the output back. Steps: 1. Run: bash ~/Downloads/LogiSwitch/install.sh It builds LogiSwitch.swift with xcrun swiftc. If Apple's Command Line Tools are missing, tell me to click Install in the pop-up, wait, then run it again. 2. LogiSwitch.swift was written on Windows and has NEVER been compiled. If the build fails, fix LogiSwitch.swift with the smallest change that keeps its behaviour, save it in ~/Downloads/LogiSwitch, and run install.sh again until it builds and prints "LogiSwitch is running." Likely trouble spots, since they were written blind: the CommonCrypto calls (CCCrypt, CCHmac, CCKeyDerivationPBKDF), the BSD socket code in ClipServer, getifaddrs in localIPv4(), and the IOHIDManager matching dictionaries. 3. When macOS asks to allow LogiSwitch under Privacy & Security > Input Monitoring, I will allow it. Then restart it: menu bar arrows icon > Quit, then run install.sh again. 4. Check: "$HOME/Library/Application Support/LogiSwitch/LogiSwitch" --list It must list my keyboard and mouse and say "Input Monitoring permission: granted". 5. Test the switching with me, reading ~/Library/Application Support/LogiSwitch/watch.log after each step: a) cursor pushed against the Mac's LEFT edge -> keyboard and mouse go to the PC b) Easy-Switch key 1 on the keyboard -> the mouse follows to the PC c) channel button 1 on the mouse -> the keyboard follows to the PC Fix anything that does not work. 6. Then set up the clipboard, which has NEVER been tested between the two computers (only Windows-to-Windows against a stand-in server): a) Menu bar icon > Clipboard sync > Share the text clipboard with the PC. Accept the warning. Note the pairing code it shows and this Mac's address. b) If macOS asks to allow incoming network connections, or for Local Network access, tell me and I will allow it. c) I will then enter the same address and pairing code on the PC and switch it on there (icon beside the clock > Clipboard sync). d) Test both directions with me: copy text on the Mac, paste on the PC, and the other way round. Expect it to arrive in well under a second. Check watch.log on this side for "clipboard: sent ..." / "clipboard: received ...". If messages are rejected, the two pairing codes do not match. 7. At the end tell me briefly: how to update later, and where the logs are. Rules: no admin password unless macOS itself asks for the Command Line Tools, no traffic outside my own local network, no third-party services, and ask me before granting any macOS permission. ----------------------------------------------------------------------------------------