LogiSwitch - ready-made prompts for Claude
==========================================
Copy everything between the === lines of the section you need and paste it into
any Claude chat (any account). If the install fails on a Mac, you don't need to
copy anything: install.sh writes LogiSwitch-fix-request.txt to your Desktop and
copies it to the clipboard automatically - just paste.


AUTOMATIC PROBLEM REPORTS
  When LogiSwitch detects a problem by itself (watcher crash, a switch that reached no
  device, macOS blocking device access) it writes a complete report for Claude
  automatically and shows a notification:
    Desktop:  LogiSwitch-problem-report.txt
    Windows:  %LOCALAPPDATA%\LogiSwitch\last-problem-report.txt
    Mac:      ~/Library/Application Support/LogiSwitch/last-problem-report.txt
  Click the notification (or icon menu > Open automatic problem report) to copy it, and
  paste it into any Claude chat. The report starts with its own instructions for Claude.
  With Claude Code on that computer, just say:
    "Read the LogiSwitch problem report at <path above> and fix it."


=== MAC: FIRST INSTALL WITH CLAUDE (Claude Code / Claude with terminal access) ===
I have a folder named LogiSwitch on this Mac (probably ~/Downloads/LogiSwitch; find it).
It is my own tool that switches my Logitech keyboard and mouse between this Mac and my
Windows PC when I push the cursor against the screen edge, or when I press the Easy-Switch
button on either device (the other follows). Read its README.txt first.
A previous install attempt failed and left no useful log; LogiSwitch-install-log.txt and
LogiSwitch-fix-request.txt on my Desktop (if present) show what happened.

Please install the macOS part:
1. Run:  bash install.sh   inside that folder. 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 until it finishes, then run install.sh again.
2. This Swift code was written on Windows and has never been compiled. If the build fails,
   fix LogiSwitch.swift with the smallest change that keeps its behavior (HID++ 2.0 feature
   0x1814 "Change Host" over IOKit for Bluetooth usage page 0xFF43 and Unifying/Bolt receivers
   usage page 0xFF00; edge watcher; menu-bar menu; settings/devices JSON), then run install.sh
   again until it succeeds.
3. Verify, with my Logitech keyboard and mouse connected to this Mac:
   - macOS asks to allow LogiSwitch under Privacy & Security > Input Monitoring: I allow it,
     then restart the app (menu bar icon > Quit, then  bash install.sh  again)
   - "$HOME/Library/Application Support/LogiSwitch/LogiSwitch" --list   shows them
     (and says Input Monitoring is granted)
   - pressing the Easy-Switch button on the keyboard OR the mouse makes the other follow
     to the PC (check watch.log)
   - the arrows icon is in the menu bar; its menu says "PC is to the LEFT" and PC channel 1
     (change them in the menu if my setup differs)
   - when I push the cursor against the Mac's left edge, both devices go to my PC
     (check ~/Library/Application Support/LogiSwitch/watch.log)
4. If you changed any file, keep the corrected files in the LogiSwitch folder and tell me,
   so the folder (with the new mac-bin/ subfolder) becomes my working package for other Macs.
5. Finally tell me in 3 lines: how to UPDATE later (bash install.sh from the newer folder,
   or menu bar icon > Update), and where the LOGS are:
   ~/Library/Application Support/LogiSwitch/watch.log, stderr.log, install.log, and
   ~/Desktop/LogiSwitch-install-log.txt.

Rules: no admin password unless macOS itself asks for the Command Line Tools, no internet or
third-party services (clipboard sync stays off unless I turn it on), and ask me before granting any
macOS permission (for example Input Monitoring).
=== END MAC: FIRST INSTALL WITH CLAUDE ===


=== MAC: INSTALL FAILED - PLEASE FIX ===
The LogiSwitch installer failed on my Mac. LogiSwitch is my own small tool that switches my
Logitech keyboard and mouse between this Mac and my Windows PC: a Swift menu-bar app
(LogiSwitch.swift) that sends the Logitech HID++ 2.0 "Change Host" command (feature 0x1814,
function 1 setCurrentHost, 0-based host index) over IOKit HID when the cursor is pushed
against the screen edge facing the PC. Bluetooth devices: primary usage page 0xFF43, long
report ID 0x11 (20 bytes, report ID included in the buffer), device index 0xFF.
Unifying/Bolt receivers: usage page 0xFF00, device index 1-6, errors as short report 0x10/0x8F.
install.sh builds it with:
  xcrun swiftc -O -o LogiSwitch LogiSwitch.swift -framework AppKit -framework IOKit
The code was written on Windows and had never been compiled before.

The installer output, my macOS version and the full source are below.

Please:
1. Find the cause of the failure.
2. Give me the COMPLETE corrected file(s), full content ready to save over the old ones
   in my LogiSwitch folder (smallest change, keep the behavior), or exact Terminal commands.
3. Tell me to run  bash install.sh  in the LogiSwitch folder again, and how to check it
   works:  "$HOME/Library/Application Support/LogiSwitch/LogiSwitch" --list
Rules: no internet or third-party services, keep clipboard sync as it is (off by default), no admin password,
ask before any macOS permission.
=== END MAC: INSTALL FAILED - PLEASE FIX ===


=== WINDOWS: INSTALL OR PROBLEM ON A NEW PC ===
I have a folder named LogiSwitch on this Windows PC. It is my own tool (PowerShell 5.1 +
embedded C#) that switches my Logitech keyboard and mouse to my Mac when I push the cursor
against the screen edge, using the Logitech HID++ 2.0 "Change Host" command (feature 0x1814)
over Bluetooth or a Unifying/Bolt receiver. Read its README.txt first.

Please:
1. Install it by running Install.cmd in that folder (no admin rights are available).
2. Check that  %LOCALAPPDATA%\LogiSwitch\LogiSwitch.ps1 -List  shows my Logitech devices and
   that the green icon is beside the clock (menu: where the Mac is, Mac's channel).
3. If anything fails, find the cause and fix the scripts with the smallest change.
Rules: no admin rights, no firewall/security/Group Policy changes, no internet or
third-party services, keep clipboard sync as it is (off by default).
=== END WINDOWS ===
