EduardoMG12/mickey
Sobre
One keyboard and mouse for all your computers, in Rust (learning project)
Aprendizado e educaçãoCrescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- +11
- em 15 dias
- +47
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
Original
Mickey
One keyboard and mouse for all your computers, written in Rust.
Push the cursor off the edge of one screen and it appears on the next PC; copy on one and paste on another. Linux and Windows, and any of them can be the one whose keyboard you use. Inspired by Synergy, Deskflow/Input Leap and lan-mouse, built from scratch to be understood line by line.
Status: alpha. Used every day between an Arch Linux laptop (Hyprland) and a Windows PC, and tested on ten more Linux setups (below). Expect rough edges, and read the known limits.
Contents: What it does · Screenshots · Releases · Install · First steps · Everyday use · Known limits · Security · Privacy · Build from source · How it is developed
Click either one for the whole film (35 s, no sound).
What it does
- Move between PCs across the screen edges (Windows, and on Linux Hyprland, GNOME, KDE Plasma, Sway and X11 desktops), with a hotkey, or with the switcher: one card per PC, shown on the screen you are looking at.
- Any PC drives any other. Every PC runs the same
mickey; the one whose keyboard and mouse you touch is the one in charge. - A shared clipboard that follows the keyboard. Copy on one PC, move to another, paste: text and images. Or keep it where it is until you press AltGr + Right Shift + C. The recent copies are kept in a searchable history, in memory only.
- Copy a folder on one PC, paste it on another. Files and whole folders of any size cross with plain Ctrl+C and Ctrl+V, encrypted, each file checked, pasted only once all are there. A broken transfer goes on where it stopped, and big ones ask first.
- One pair of headphones for every PC. Pick the PC your headphones are on, and every PC's sound plays there, mixed, each at its own volume, about 25 ms behind what you see (Linux with PipeWire or PulseAudio, and Windows).
- Finds your PCs and pairs them with a code. PCs running Mickey on the network show up in the settings: press Connect, check that both screens show the same six-digit code, press Pair. A PC paired with one of yours is trusted by the rest of the group.
- Encrypted. Everything crosses the network inside a Noise channel, and only between paired PCs.
- A way home that always works. Hold Right Shift for 3 seconds (or AltGr + Right Shift for 2) and let go: the keyboard and mouse come back to this PC, whatever the settings say.
- A tray icon that shows where the keyboard is (a green dot: here; red: on another PC) with a menu to move it; a settings window for the rest; it starts with your session.
Screenshots
A folder copied on another PC, on its way: the Ratão runs until every file is there and checked.
Over 1 GB, Mickey asks first · when it is done, it says what did not come, and why.
The Layout tab: drag each PC to where its screens sit.
Pairing shows the same six-digit code on both PCs · the settings window.
The switcher: one card per PC, shown on the screen you are looking at.
Settings › General: how the clipboard is shared, and the history.
Releases
What changed in each version, newest first, is in CHANGELOG.md, the same text Mickey shows once after an update. Each release's page, with pictures of what is new, is on Releases.
Install
Download the latest release from the repository's Releases page.
Windows
- Run
Mickey-Setup-<version>.exe. It installs to Program Files, starts Mickey at logon (as administrator, so it can also drive administrator windows), allows it through the firewall on private networks only and adds Mickey settings to the Start menu. Remove it from Settings → Apps.
Linux
- Any distro (x86-64, glibc 2.35 or newer, systemd, and PulseAudio's
client library, which every desktop has;
install.shsays how to add it if not): unpackmickey-linux-x86_64.tar.gzand run./install.sh. It asks for your password once: theinputgroup and a udev rule let Mickey read your keyboard and create its virtual one, and if firewalld or ufw is on it opens TCP 4242-4244 and UDP 4243-4244. Mickey goes to~/.local/binand starts with your desktop session. If it had to add you to theinputgroup, restart the PC once../uninstall.shremoves everything. Updating from 0.5.0 or older with a firewall on: Mickey updates itself withoutsudo, so let in TCP 4244 (file transfers) once by hand,sudo ufw allow 4244/tcporsudo firewall-cmd --permanent --add-port=4244/tcp. - Debian, Ubuntu, Mint or Fedora, for every user of the PC: the
release's
mickey_<version>_amd64.deb(sudo apt install ./mickey_*.deb) ormickey-<version>-1.x86_64.rpm(sudo dnf install ./mickey-*.rpm). They install under/usr, add the person who ran the command to theinputgroup (restart once), and leave the firewall alone (open TCP 4242-4244 and UDP 4243-4244 if one is on). Update and remove them withaptordnf; Mickey does not update itself then. Use the package orinstall.sh, not both.
macOS (preview)
New in 0.7.0 and still a preview: tested by its contributor, not yet on many Macs. Apple Silicon (M1 or newer) and macOS 14.2 or newer only. It is not signed by Apple yet, so macOS does not know who made it.
- Download
mickey-macos-aarch64.tar.gzand unpack it. - In Terminal, in the unpacked folder, clear the "downloaded from the
internet" mark, then install:
xattr -dr com.apple.quarantine . && ./install.shMickey goes to~/Applications/Mickey.appand starts at login. - In System Settings → Privacy & Security, turn Mickey on under Accessibility and Input Monitoring, and under Screen & System Audio Recording to share its sound.
Each update may ask for those switches again, until Mickey is signed by
Apple. ./uninstall.sh removes it. Found a problem? Tell us in an issue.
Each release also has SHA256SUMS: sha256sum -c SHA256SUMS --ignore-missing
in the download folder checks what you got.
Coming soon
- winget (
winget install EduardoMG12.Mickey): submitted to Microsoft (microsoft/winget-pkgs#465909), waiting for its review. - AUR (
mickey-bin): the package is ready inpackaging/aur/, and goes up once the AUR opens new accounts again. - A signed Windows installer: applied for free code signing for open source at SignPath Foundation (see the code signing policy). Until then Windows warns about an unknown publisher, and Defender may flag it (why).
Tested on
| System | Desktop | Notes |
|---|---|---|
| Arch Linux | Hyprland (Wayland) | the owner's laptop; screen edges work |
| Windows 10 | screen edges work | |
| Ubuntu 24.04 | GNOME (Wayland) | screen edges work, in a test VM |
| Ubuntu 22.04 | GNOME | the oldest supported (glibc 2.35); install, start and discovery checked |
| Linux Mint 22.3 | Cinnamon (X11) | screen edges work |
| Fedora 44 | KDE Plasma (Wayland) | screen edges work, in a test VM |
| Debian 13 | GNOME (Wayland) | no tray icon without an extension (why) |
| Pop!_OS 24.04 | COSMIC (Wayland) | screen edges both ways, in a test VM, one monitor (details) |
| Xubuntu 24.04 | XFCE (X11) | |
| openSUSE Tumbleweed | KDE Plasma (Wayland) | install, start, firewall and discovery checked |
| Ubuntu 24.04 | Sway 1.9 (Wayland), headless | screen edges both ways, against GNOME in the same VM |
| macOS (Apple Silicon) | preview: checked by its contributor on a MacBook Air M2, against Linux |
On the other Linux distros: the installer, starting at login, the windows,
the tray, pairing, keys both ways and the clipboard both ways, in test
virtual machines (tools/distro-test/, results in #171).
First steps
- Install Mickey on every PC.
- On one of them, open Mickey settings (from the applications or Start
menu, the tray, or
mickey settings) and go to the PCs tab. The other PCs appear under On this network: press Connect. - Both PCs show a window with the same six-digit code. If it matches, press Pair on both. (A code that differs means something is in between: press Refuse.)
- In the Layout tab, drag the new PC to where its screens sit next to this one's, and Save. Every PC learns the layout.
- Push the cursor off that edge, or press AltGr + Right Shift.
A PC on another network does not show up in the list: use Add by address…, and on that PC press Let a new PC pair (2 min).
Everyday use
Hotkeys
| Keys | Does |
|---|---|
| AltGr + Right Shift | One other PC: go there, or come back. Two or more: open the switcher |
| AltGr + Right Shift + 1 … + 9 | Straight to that PC (in the order of the PCs tab) |
| AltGr + Right Shift + 0 | Back to this PC |
| AltGr + Right Shift + C | Bring the clipboard of the PC you just left (when Share the clipboard is Only when I press…) |
| AltGr + Up | Open the switcher |
| AltGr + Right / AltGr + Left | The next / previous PC, skipping the offline ones |
| Right Shift twice, quickly | Same as AltGr + Right |
| Right Shift held 3 s, or AltGr + Right Shift held 2 s | Home, always: no setting can take this away |
On keyboards without AltGr, it is the Right Alt key. A hotkey fires when you let go and only if nothing else was pressed, so AltGr + Q and Shift + 1 still type. Change them in the Hotkeys tab (Type records the keys); saved hotkeys go to every PC in the group, so all use the same ones.
The switcher
One card per PC; pick one with the arrow keys and Enter, or a click; Esc cancels. It opens on the PC you are looking at, and a view-only copy shows on the others. Choose its corner in the settings (General).
The clipboard and its history
Nothing crosses on every copy: when the keyboard moves from one PC to
another, what was copied on the first is put on the second. Copied files
and folders go as a transfer (next section). Rather choose when? Pick
Only when I press AltGr + Right Shift + C under Share the clipboard
(General): the keyboard then moves alone, and that hotkey, pressed on
the PC you went to within 5 seconds, brings what you copied on the one you
left. Clipboard history (tray menu, or
mickey history) lists the last 50 copies, searchable; pick one to copy it
again. It lives in memory only and is gone when Mickey stops. Already
using a clipboard manager (cliphist, CopyQ, Klipper, GPaste, Windows' own
Win+V history)? Mickey notices when it starts and leaves the history to
it: the clipboard is still shared, and the manager sees everything Mickey
writes. To choose yourself, pick Always or Never in the settings
(General), or set [clipboard] history = true or false.
Rather keep the clipboard to each PC? Pick Never under Share the
clipboard (or set [clipboard] share = "off"): this PC's keyboard then
moves without it, and what other PCs sent here before (received files,
the history) is deleted. Each PC chooses for its own keyboard.
Copy files and folders
Copy files or a whole folder in your file manager, move the keyboard to another PC, and paste with Ctrl+V. Mickey fetches them over the encrypted link, checks every file (BLAKE3), and pastes them only once all are there. A transfer that takes a while shows its progress in a corner, with Cancel.
- Big copies ask first. Over 1 GB, a small window asks whether to
bring them, into
Downloads/Mickey. The 1 GB, where the window appears and when to suggest cleaning that folder are in General. Mickey never deletes what you brought. - It never fills your disk: a free-space margin is kept, and a transfer that would not fit says so before it starts.
- It goes on where it stopped. A transfer broken by the network, a sleeping PC or Cancel resumes at the exact byte the next time the keyboard crosses with the same copy.
- You see what did not come, and why: a file that changed meanwhile, a link (links inside a folder are left out), a name Windows refuses.
- On Windows, files from your own PCs are marked as from your local network, so SmartScreen and Office do not warn about them; Defender still scans them. Warn before opening files from other PCs in General brings the warnings back.
With a firewall on, let in TCP 4244 (the installers do it for you).
With a PC running Mickey 0.5 or older, copied files still cross the old
way, whole with the clipboard, up to 60 MiB, into Mickey's cache
(~/.cache/mickey/received, %LOCALAPPDATA%\mickey\received).
Shared sound
Pick the PC your headphones are on: in the settings (This PC → Where are your headphones?) on any PC, or Listen here in its tray. Every PC learns it at once, and from then on every PC's sound plays there, mixed with that PC's own, while each PC goes quiet. Each PC's volume and mute are next to it in PCs, the same on every PC. Per PC you can also keep its sound playing there too, or keep it at home (When another PC has the headphones, this PC's sound). Pick Nobody and every PC uses its own speakers again.
The sound crosses encrypted, only between paired PCs, in 5 ms pieces over
UDP 4244; nothing is sent while a PC plays nothing. Two PCs' sound cards
never run at quite the same speed, so the PC that listens plays a hair
faster or slower, never heard, to keep the delay at about 25 ms for as
long as it plays. On Windows Mickey
mutes the speakers while it sends (and unmutes them after, even if it
ended unexpectedly); on Linux it moves the sound to a silent output of its
own and puts the real one back when it stops, on Ctrl+C or
systemctl --user stop mickey too.
The tray, commands and Waybar
The tray menu moves the keyboard to any PC and opens the settings and the
history. The same things work from a terminal, for launchers and
compositor binds (mickey --help lists them all):
mickey status # where the keyboard is, and which PCs are online
mickey go Desktop # send the keyboard and mouse to the PC named Desktop
mickey home # bring them back
mickey switcher # show the switcher
A Hyprland bind such as bind = SUPER ALT, 1, exec, mickey go Desktop only
reaches Mickey while the keyboard is on this PC; from another PC, use the
hotkeys.
Waybar: a module that changes the moment the keyboard moves; left click
opens the switcher, right click the settings. Its class is local,
remote or off, for the bar's CSS:
"custom/mickey": {
"exec": "mickey status --waybar",
"return-type": "json",
"on-click": "mickey switcher",
"on-click-right": "mickey settings"
}
Settings by hand
The settings window writes config.toml for you
(~/.config/mickey/config.toml; %APPDATA%\mickey\config.toml on Windows),
and follows it when another PC rewrites it. Editing it by hand works too;
restart Mickey afterwards, or run mickey arranged after changing positions.
The address field in [[peer]] accepts a hostname and port, such as
desktop.example.org:4242, as well as IPv4 and bracketed IPv6 addresses.
Mickey resolves the name again when reconnecting and still checks the
peer's pairing key.
Updating
When a newer Mickey is out, the tray's menu starts with Update to
Mickey 0.x.y, and the settings window shows a red banner with Update
now. Either downloads the release, checks that it is signed by the
release key and unchanged, installs it and restarts Mickey. On Windows the
system asks for an administrator once; on Linux nothing is asked. From a
terminal: mickey update check, then mickey update apply. The PCs tab
shows each PC's version, so one left behind stands out.
For AI agents (MCP)
mickey mcp is a Model Context Protocol server, so an agent such as
Claude Code can see and drive the Mickey on its own PC:
claude mcp add mickey -- mickey mcp. Its tools: status,
switch_keyboard, set_listener, set_volume, check_update,
apply_update and install. It never pairs a PC (you compare the codes
yourself), never types or presses keys, and never reads your clipboard.
When something goes wrong
Mickey's log says what it is doing (never which keys you press):
journalctl --user -u mickey on Linux, and
%LOCALAPPDATA%\mickey\mickey.log on Windows (the previous run's is
mickey.log.old). Add it to an issue when you report a problem.
Known limits
- Measured on Wi-Fi only. Between the owner's Windows PC and Arch laptop over Wi-Fi: keyboard and mouse p50 2.1 ms, p99 22.6 ms one way; sound about 25 ms behind (0.6.0, measured both ways with a test tone). The budgets for a cable (input p99 under 2 ms, sound p99 under 40 ms) have not been checked: no cable was at hand.
- Screen edges on Sway were checked in a test VM only (a headless Sway), not on a real Sway desktop yet. Other wlroots compositors (river, labwc, Wayfire) get them the same way, through one-pixel strips on the edges, but have not been tried.
- COSMIC (Pop!_OS 24.04) has no InputCapture portal, so Mickey watches its edges through one-pixel strips instead (#429); where its portal has no RemoteDesktop either, as on the 24.04 ISO, a COSMIC PC being controlled places and follows the cursor through an absolute virtual pointer (#459). Both ways were checked in a test VM, on one monitor only. The controlled side gets no pointer acceleration, as on GNOME and KDE when controlled.
- The switcher on GNOME (Wayland) opens without a title bar, but where GNOME puts it, not in the chosen corner: GNOME lets no program place a window. On KDE Plasma and Hyprland it goes to its corner.
- Touchpad: while it controls another PC, Mickey reads the touchpad
itself: motion, two-finger scroll, taps (one finger left, two right,
three middle) and tap-and-drag. Tap to click and natural scrolling follow
GNOME's, KDE's or Hyprland's own settings, or the This PC tab; elsewhere set them under
[touchpad]inconfig.toml(taps are off until you do). A click on a clickpad is always a left click: right-click with a two-finger tap. - VPNs. A VPN that only carries some traffic (split tunnel: Tailscale
without an exit node, Radmin VPN, ZeroTier, most WireGuard setups) leaves
Mickey alone: it finds and reaches the other PCs over the local network
as before. This was checked with Tailscale on Linux and Radmin VPN on
Windows, both on at once. A VPN that sends all traffic through the
tunnel (full tunnel, as many corporate and privacy VPNs do) usually
blocks the local network on purpose, so the PCs can't see each other.
That's true for any LAN tool, Mickey included. Turn on the VPN's
"allow local network" option if it has one (Tailscale:
--exit-node-allow-lan-access; WireGuard: leave your LAN out ofAllowedIPs). Two PCs on the same VPN should also reach each other through it if you save the other PC by its VPN address or name; they won't find each other on their own there (not tested yet). - Windows' secure screens (lock screen, UAC prompt,
Ctrl+Alt+Del) take no input from any program; if a PC refuses the input, the keyboard comes home. - Keys are sent by position, so give both PCs the same keyboard layout (e.g. ABNT2).
- No tray icon on stock GNOME (Debian, Fedora Workstation): GNOME has
no area for status icons of its own. Ubuntu ships the AppIndicator and
KStatusNotifierItem Support extension switched on; elsewhere install
gnome-shell-extension-appindicator(Debian and Fedora name it the same), turn it on in Extensions and log in again. Mickey works without it:mickey statussays where the keyboard is, andmickey settingsopens the settings window. - The clipboard on GNOME (Wayland) goes through XWayland, which GNOME starts when Mickey asks: if it is turned off, the clipboard does not cross there. Image copies made on GNOME reach the history only when they cross, as on X11.
- The
inputgroup lets every program you run read the keyboard, not only Mickey; desktop portals are the long-term fix (#178). - Local network only: no relay over the internet.
- Windows Defender may block the installer or remove
mickey.exeasTrojan:Win32/Bearfoos.B!mlorBehavior:Win32/Persistence.A!ml. The!mlmeans its machine-learning guess, not a known virus: a new program, not code-signed yet, that reads the keyboard and talks over the network looks like a keylogger to it. Check the download againstSHA256SUMS, then in Windows Security → Virus & threat protection → Protection history open the item and choose Allow on device, or addC:\Program Files\Mickeyto Defender's exclusions. Signing has been applied for (Coming soon). - Shared sound is stereo and local-network only; microphones and cameras do not cross (they would need a virtual device, on Windows a driver). Linux needs PipeWire or PulseAudio, which every current desktop has.
Security
Everything you type crosses the network, so:
- Encrypted and authenticated. Everything travels inside a Noise
XXchannel (X25519, ChaCha20-Poly1305, BLAKE2s): it cannot be read, changed or replayed. - Paired PCs only. Each PC has its own key (
mickey idshows its fingerprint). The six-digit code both pairing windows show comes from the encrypted handshake itself: if both show the same code, no one is in between. Trust is by key, never by address; reconnects never ask again.mickey forget <fingerprint>removes a PC. - The group: when one of your paired PCs introduces another PC, Mickey asks you once whether to let it in; nothing is trusted on another PC's word alone.
- Never logged or stored: what you type, and what you copy (only its kind and size).
- Not covered: someone who can already log in as you (they can read the key files, as with SSH keys), and someone on the network who just wants to break the connection.
Found a problem? See SECURITY.md.
Privacy
Mickey has no telemetry and no accounts. Its one request to the internet
is the update check (PRD 0013): once a day it asks GitHub which Mickey
release is the latest. That request carries nothing about you, only what
any HTTPS request does (your IP and mickey/<version>), and [updates] check = false in config.toml turns it off. Everything else stays
between the PCs on your network that run Mickey: it announces this PC's
name and key so they can find it, and, once you pair them, sends them
your keyboard and mouse while they have the focus, your clipboard when
it moves there, and this PC's sound when you share it, all encrypted. Typed keys are never logged or
written to disk. Clipboard history and received files stay on your PCs.
Code signing policy
The Windows releases are meant to be signed (free code signing for open source by SignPath.io, certificate by SignPath Foundation); until then they are not.
- Who builds: only the release workflow
(
.github/workflows/release.yml), from a version tag onmain, withCargo.lock. - Team roles: authors, reviewers and approvers are the maintainer,
@EduardoMG12. Authors commit; every
change reaches
mainthrough a pull request, which a reviewer reviews; an approver approves each release (the workflow'sreleaseenvironment) and each signing request. - Accounts: every team member uses multi-factor authentication on GitHub and on SignPath.
- Only this project's code: nothing is signed that was not built from this repository by the release workflow.
- Checking a download: every release has
SHA256SUMS, signed with the release key inpackaging/release-key.pub(SHA256SUMS.sig). Runtools/release-key/verify.sh SHA256SUMS, thensha256sum -c SHA256SUMS. Mickey makes the same two checks before it installs an update.
Nix
On x86_64 Linux, try Mickey directly from the flake:
nix run github:EduardoMG12/mickey -- --help
nix run github:EduardoMG12/mickey -- settings
With Home Manager, add github:EduardoMG12/mickey as a flake input, import
inputs.mickey.homeManagerModules.default in the home configuration and set
programs.mickey.enable = true;. The service starts with the graphical
session. The Settings app manages the writable configuration and pairing.
On NixOS, the account needs access to the Linux input devices. The existing
udev rule is included in the package.
Add inputs.mickey.packages.x86_64-linux.default to services.udev.packages
and add the account that runs Mickey to the input group. The group can read
all input events. Log out and back in after changing group membership.
For development, run nix develop from a checkout, then cargo test --workspace.
The Nix integration is maintained by @pschmitt.
Build from source
Needs Rust, and on Linux PulseAudio's headers for
shared audio (libpulse-dev on Debian and Ubuntu, pulseaudio-libs-devel
on Fedora; Arch's libpulse has them). Input hotplug also needs libudev
headers (libudev-dev on Debian and Ubuntu, systemd-devel on Fedora,
and systemd-libs on Arch). On Linux you can build both; the
Windows programs are cross-compiled:
cargo build --release # Linux: target/release/mickey and mickey-ui
rustup target add x86_64-pc-windows-gnu # once
sudo pacman -S mingw-w64-gcc # once (Arch; other distros: mingw-w64)
cargo build --release --target x86_64-pc-windows-gnu # Windows: target/x86_64-pc-windows-gnu/release/
mickey-ui (the windows) must sit next to mickey. cargo test runs the
tests; CONTRIBUTING.md has the rest.
Roadmap
| Next | What you get |
|---|---|
| Any desktop | Native GNOME and KDE support through desktop portals: screen edges everywhere, no input group (#178) |
| Packages | winget, AUR and Scoop (.deb and .rpm are out already) (#176) |
| macOS | Out of preview: signed by Apple, tested on more Macs, Intel too (#423) |
| Someday | Sharing headphones and other USB devices, remote control over the internet |
Architecture at a glance
┌─────────────── mickey on the machine with the keyboard ───────────────┐
│ capture backend ──► core: layout, focus, pressed keys ──► transport │
└───────────────────────────────────────────────────────────────┬───────┘
│ LAN
┌─────────────── mickey on the controlled machine ──────────────▼───────┐
│ transport ──► core ──► emit backend (uinput on Linux, SendInput) │
└───────────────────────────────────────────────────────────────────────┘
- Capture reads the physical keyboard and mouse. Emit creates input on the controlled machine. Each is per-platform; everything else is shared.
- All
unsafecode is confined to the platform modules; the core and the protocol are safe Rust.
Full design: docs/prds/0000-vision.md. To learn the code, read docs/architecture.md (crates, threads, the platform layer), docs/protocol.md (what crosses the network) and docs/flows.md (pairing, focus and edges, the switcher, the clipboard), each with diagrams.
How this project is developed
Mickey is a learning project, and its process is part of the point:
- Every PR is one logical change (about 400 lines of logic or less) with a description that explains what changed, why, how it works and how it was verified, so it can be understood before reading the diff.
- When a classic algorithm or data structure shows up (state machine, graph, set, framing a byte stream, …), the PR explains the concept and the matching LeetCode problem.
- Only the owner merges.
Details: CONTRIBUTING.md. Rules for AI assistants: CLAUDE.md.
License
GPL-3.0-or-later. The releases also carry THIRD-PARTY-LICENSES.txt,
the licenses of the crates built into Mickey
(tools/licenses makes it).
Explore projetos relacionados
Carregando…