SwiGi
🔀 Sync Logitech Easy-Switch between keyboard & mouse over Bluetooth. No receiver, no Logi Options+, no same-network needed.
Install / Use
/learn @LeeHoffka/SwiGiREADME
🔀 SwiGi
Switch your keyboard. Mouse follows. Done.
SwiGi syncs Easy-Switch between Logitech keyboard and mouse over Bluetooth — no receiver, no Logi Options+, no same-network requirement.
Press Easy-Switch on keyboard → mouse automatically switches to the same host.
<p align="center"> <i>Did it save you time and frustration?</i><br><br> <a href="https://github.com/sponsors/LeeHoffka" target="_blank"><img src="https://img.shields.io/badge/Sponsor-%E2%9D%A4-pink?style=for-the-badge&logo=github" alt="Sponsor on GitHub" height="40"></a> </p>Made for people. Enjoy it and stop being a slave to buttons. ✌️
🇬🇧 English — you're reading it | 🇨🇿 Česky — scroll down
🇬🇧 English
Why?
Since 2019, Logitech has been saying that synchronized keyboard-mouse switching "can't be done" without Flow (which requires the same network). Thousands of people have been begging for it on forums. Well, here it is.
Requirements
- Logitech keyboard + mouse with Easy-Switch and Bluetooth (MX series, Ergo series, etc.)
- Python 3.10+ (or portable build without Python)
- hidapi library
Quick Start
macOS:
brew install hidapi
python3 swigi.py
Windows:
- Download
hidapi.dllfrom github.com/libusb/hidapi/releases → Assets →hidapi-win.zip→x64/hidapi.dll - Place
hidapi.dllnext toswigi.py
python swigi.py
Linux:
sudo apt install libhidapi-hidraw0
python3 swigi.py
Portable (no Python installation needed)
macOS
brew install hidapi pyinstaller
./build_mac.sh
# Output: dist/SwiGi/ — copy anywhere
Windows (no admin rights needed)
- Download Python embeddable (ZIP, not installer) → extract to
python-3/ - Download
hidapi.dll(see above) - Put
swigi.py,hidapi.dll,python-3/,setup_win.batin one folder - Run
setup_win.bat
Autostart
macOS (launchd)
cat > ~/Library/LaunchAgents/com.swigi.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.swigi</string>
<key>ProgramArguments</key>
<array>
<string>PATH/TO/dist/SwiGi/SwiGi</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>PATH/TO/swigi.log</string>
<key>StandardErrorPath</key>
<string>PATH/TO/swigi.log</string>
</dict>
</plist>
EOF
launchctl load ~/Library/LaunchAgents/com.swigi.plist
Windows (Startup folder)
Win+R→shell:startup- New shortcut →
PATH\python\pythonw.exe PATH\swigi.py - Runs in background, no window
Linux (systemd)
cat > ~/.config/systemd/user/swigi.service << 'EOF'
[Unit]
Description=SwiGi
[Service]
ExecStart=/path/to/python3 /path/to/swigi.py
Restart=always
[Install]
WantedBy=default.target
EOF
systemctl --user enable --now swigi
Permissions
- macOS: Settings → Privacy & Security → Input Monitoring → allow Terminal / SwiGi
⚠️ After every rebuild (PyInstaller), macOS no longer recognizes the binary. You must remove the old SwiGi entry from Input Monitoring and re-add the new one.
- Windows: May require HID access confirmation on first run
- Linux: Udev rule:
echo 'SUBSYSTEM=="hidraw", ATTRS{idVendor}=="046d", MODE="0666"' | \ sudo tee /etc/udev/rules.d/42-logitech-hid.rules sudo udevadm control --reload-rules && sudo udevadm trigger
How It Works
- Daemon periodically sends HID++ ping to keyboard (~250ms interval)
- Keyboard sends CHANGE_HOST notification when Easy-Switch is pressed
- Daemon catches it and sends the same command to the mouse
- Both switch to the same host
Uses HID++ 2.0 protocol (CHANGE_HOST feature 0x1814). Single Python file, no external dependencies besides hidapi.
Tested
| Device | OS | Connection | |--------|-----|------------| | MX Keys S + MX Vertical | macOS (Sequoia) | Bluetooth | | MX Keys S + MX Vertical | Windows 11 | Bluetooth |
Should work with any Logitech device combo that supports HID++ 2.0 and CHANGE_HOST.
🇨🇿 Česky
🇬🇧 English — above | 🇨🇿 Česky — čteš právě toto
Přepni klávesnici. Myš následuje. Hotovo.
SwiGi synchronizuje Easy-Switch mezi Logitech klávesnicí a myší přes Bluetooth — bez receiveru, bez Logi Options+, bez nutnosti být na stejné síti.
Děláno pro lidi. Užij si to a nebuď otrok tlačítek. ✌️
Proč?
Logitech od roku 2019 tvrdí, že synchronizované přepínání klávesnice a myši "nejde" bez Flow (a Flow vyžaduje stejnou síť). Tisíce lidí to na fórech prosí. Tak tady to je.
Co potřebuješ
- Logitech klávesnice + myš s Easy-Switch a Bluetooth (MX řada, Ergo řada, aj.)
- Python 3.10+ (nebo portable build bez Pythonu)
- hidapi knihovna
Rychlý start
macOS:
brew install hidapi
python3 swigi.py
Windows:
- Stáhni
hidapi.dllz github.com/libusb/hidapi/releases → Assets →hidapi-win.zip→x64/hidapi.dll - Dej
hidapi.dlldo stejné složky jakoswigi.py
python swigi.py
Linux:
sudo apt install libhidapi-hidraw0
python3 swigi.py
Portable (bez instalace Pythonu)
macOS
brew install hidapi pyinstaller
./build_mac.sh
# Výstup: dist/SwiGi/ — zkopíruj kamkoli
Windows (bez admin práv)
- Stáhni Python embeddable (ZIP, ne instalátor) → rozbal do
python-3/ - Stáhni
hidapi.dll(viz výše) - Dej
swigi.py,hidapi.dll,python-3/,setup_win.batdo jedné složky - Spusť
setup_win.bat
Autostart
macOS (launchd)
cat > ~/Library/LaunchAgents/com.swigi.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.swigi</string>
<key>ProgramArguments</key>
<array>
<string>CESTA/K/dist/SwiGi/SwiGi</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>CESTA/K/swigi.log</string>
<key>StandardErrorPath</key>
<string>CESTA/K/swigi.log</string>
</dict>
</plist>
EOF
launchctl load ~/Library/LaunchAgents/com.swigi.plist
Windows (Startup)
Win+R→shell:startup- Nový zástupce →
CESTA\python\pythonw.exe CESTA\swigi.py - Běží na pozadí, žádné okno
Linux (systemd)
cat > ~/.config/systemd/user/swigi.service << 'EOF'
[Unit]
Description=SwiGi
[Service]
ExecStart=/cesta/k/python3 /cesta/k/swigi.py
Restart=always
[Install]
WantedBy=default.target
EOF
systemctl --user enable --now swigi
Oprávnění
- macOS: Nastavení → Soukromí a zabezpečení → Sledování vstupu → povol Terminal / SwiGi
⚠️ Po každém rebuildu (PyInstaller) macOS binárku přestane uznávat. Musíš smazat starý záznam SwiGi ve Sledování vstupu a znovu ho přidat.
- Windows: Může vyžadovat potvrzení přístupu k HID (první spuštění)
- Linux: Udev pravidlo:
echo 'SUBSYSTEM=="hidraw", ATTRS{idVendor}=="046d", MODE="0666"' | \ sudo tee /etc/udev/rules.d/42-logitech-hid.rules sudo udevadm control --reload-rules && sudo udevadm trigger
Jak to funguje
- Daemon periodicky posílá HID++ ping na klávesnici (každých ~250ms)
- Klávesnice při stisku Easy-Switch pošle CHANGE_HOST notifikaci
- Daemon ji zachytí a pošle stejný příkaz myši
- Oba se přepnou na stejný host
Využívá HID++ 2.0 protokol (feature CHANGE_HOST 0x1814). Jeden Python soubor, žádné externí závislosti kromě hidapi.
Testováno
| Zařízení | OS | Připojení | |----------|-----|-----------| | MX Keys S + MX Vertical | macOS (Sequoia) | Bluetooth | | MX Keys S + MX Vertical | Windows 11 | Bluetooth |
Mělo by fungovat s libovolnou kombinací Logitech zařízení s HID++ 2.0 a CHANGE_HOST.
🤝 Support / Podpora
If SwiGi saves you time and frustration / Pokud ti SwiGi ušetří čas a nervy:
<a href="https://github.com/sponsors/LeeHoffka" target="_blank"><img src="https://img.shields.io/badge/Sponsor-%E2%9D%A4-pink?style=for-the-badge&logo=github" alt="Sponsor on GitHub" height="40"></a>
📜 License / Licence
MIT — do whatever you want with it / dělej si s tím co chceš.
🙏 Credits / Poděkování
Inspired by CleverSwitch by MikalaiBarysevich and protocol docs from Solaar.
