[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5764":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":45,"readmeContent":46,"aiSummary":47,"trendingCount":16,"starSnapshotCount":16,"syncStatus":48,"lastSyncTime":49,"discoverSource":50},5764,"lan-mouse","feschber\u002Flan-mouse","feschber","mouse & keyboard sharing via LAN","",null,"Rust",4868,221,34,97,0,5,20,80,17,29.04,"GNU General Public License v3.0",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"gplv3","gtk4-rs","hyprland","keyboard-emulation","kvm-switch","lan","libadwaita","linux","macos","mouse-emulation","open-source","rust","tcp","udp","wayland","wayland-client","windows","wlroots","2026-06-12 02:01:14","# Lan Mouse\n\n[![CI](https:\u002F\u002Fgithub.com\u002Ffeschber\u002Flan-mouse\u002Factions\u002Fworkflows\u002Frust.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Ffeschber\u002Flan-mouse\u002Factions\u002Fworkflows\u002Frust.yml) [![Cachix](https:\u002F\u002Fgithub.com\u002Ffeschber\u002Flan-mouse\u002Factions\u002Fworkflows\u002Fcachix.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Ffeschber\u002Flan-mouse\u002Factions\u002Fworkflows\u002Fcachix.yml) [![Release](https:\u002F\u002Fgithub.com\u002Ffeschber\u002Flan-mouse\u002Factions\u002Fworkflows\u002Frelease.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Ffeschber\u002Flan-mouse\u002Factions\u002Fworkflows\u002Frelease.yml)\n\n[![crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Flan-mouse.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Flan-mouse)  [![license](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fl\u002Flan-mouse.svg)](https:\u002F\u002Fgithub.com\u002Ffeschber\u002Flan-mouse\u002Fblob\u002Fmain\u002FCargo.toml)\n\nLan Mouse is a *cross-platform* mouse and keyboard sharing software similar to universal-control on Apple devices.\nIt allows for using multiple PCs via a single set of mouse and keyboard.\nThis is also known as a Software KVM switch.\n\nGoal of this project is to be an open-source alternative to proprietary tools like [Synergy 2\u002F3](https:\u002F\u002Fsymless.com\u002Fsynergy), [Share Mouse](https:\u002F\u002Fwww.sharemouse.com\u002Fde\u002F)\nand other open source tools like [Deskflow](https:\u002F\u002Fgithub.com\u002Fdeskflow\u002Fdeskflow) or [Input Leap](https:\u002F\u002Fgithub.com\u002Finput-leap) (Synergy fork).\n\nFocus lies on performance, ease of use and a maintainable implementation that can be expanded to support additional backends for e.g. Android, iOS, ... in the future.\n\n***blazingly fast™*** because it's written in rust.\n\n- _Now with a gtk frontend_\n\n\u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"\u002Fscreenshots\u002Fdark.png?raw=true\">\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"\u002Fscreenshots\u002Flight.png?raw=true\">\n    \u003Cimg alt=\"Screenshot of Lan-Mouse\" srcset=\"\u002Fscreenshots\u002Fdark.png\">\n\u003C\u002Fpicture>\n\n\n## Encryption\n\nLan Mouse encrypts all network traffic using the DTLS implementation provided by [WebRTC.rs](https:\u002F\u002Fgithub.com\u002Fwebrtc-rs\u002Fwebrtc).\nThere are currently no mitigations in place for timing side-channel attacks.\n\n## OS Support\n\nMost current desktop environments and operating systems are fully supported, this includes\n- GNOME >= 45\n- KDE Plasma >= 6.1\n- Most wlroots based compositors, including Sway (>= 1.8), Hyprland and Wayfire\n- Windows\n- MacOS\n\n\n### Caveats \u002F Known Issues\n\n> [!Important]\n> - **X11** currently only has support for input emulation, i.e. can only be used on the receiving end.\n>\n> - **Sway \u002F wlroots**: Wlroots based compositors without libei support on the receiving end currently do not handle modifier events on the client side.\n> This results in CTRL \u002F SHIFT \u002F ALT \u002F SUPER keys not working with a sending device that is NOT using the `layer-shell` backend\n>\n> - **Wayfire**: If you are using [Wayfire](https:\u002F\u002Fgithub.com\u002FWayfireWM\u002Fwayfire), make sure to use a recent version (must be newer than October 23rd) and **add `shortcuts-inhibit` to the list of plugins in your wayfire config!**\n> Otherwise input capture will not work.\n>\n> - **Windows**: The mouse cursor will be invisible when sending input to a Windows system if\n> there is no real mouse connected to the machine.\n\nFor more detailed information about os support see [Detailed OS Support](#detailed-os-support)\n\n### Android & IOS\n\nA proof of concept for an Android \u002F IOS Application by [rohitsangwan01](https:\u002F\u002Fgithub.com\u002Frohitsangwan01) can be found [here](https:\u002F\u002Fgithub.com\u002Frohitsangwan01\u002Flan-mouse-mobile).\nIt can be used as a remote control for any device supported by Lan Mouse.\n\n## Installation\n\n\u003Cdetails>\n    \u003Csummary>Arch Linux\u003C\u002Fsummary>\n\nLan Mouse can be installed from the [official repositories](https:\u002F\u002Farchlinux.org\u002Fpackages\u002Fextra\u002Fx86_64\u002Flan-mouse\u002F):\n\n```sh\npacman -S lan-mouse\n```\n\nThe prerelease version (following `main`) is available on the AUR:\n\n```sh\nparu -S lan-mouse-git\n```\n\u003C\u002Fdetails>\n\n\n\u003Cdetails>\n    \u003Csummary>Nix (OS)\u003C\u002Fsummary>\n\n- nixpkgs: [search.nixos.org](https:\u002F\u002Fsearch.nixos.org\u002Fpackages?channel=unstable&show=lan-mouse&from=0&size=50&sort=relevance&type=packages&query=lan-mouse)\n- flake: [README.md](.\u002Fnix\u002FREADME.md)\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n    \u003Csummary>Fedora\u003C\u002Fsummary>\nYou can install Lan Mouse from the [Terra Repository](https:\u002F\u002Fterra.fyralabs.com).\n\n\nAfter enabling Terra:\n\n```sh\ndnf install lan-mouse\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n    \u003Csummary>MacOS\u003C\u002Fsummary>\n\n- Download the package for your Mac (Intel or ARM) from the releases page\n- Unzip it\n- Remove the quarantine with `xattr -rd com.apple.quarantine \"Lan Mouse.app\"`\n- Launch the app\n- Use the menu bar item to open the settings window or quit Lan Mouse. Bundled macOS builds run as a menu bar app and do not keep a Dock icon visible.\n- Grant accessibility permissions in System Preferences\n\n\u003C\u002Fdetails>\n\n\n\u003Cdetails>\n    \u003Csummary>Manual Installation\u003C\u002Fsummary>\n\nFirst make sure to [install the necessary dependencies](#installing-dependencies-for-development--compiling-from-source).\n\nPrecompiled release binaries for Windows, MacOS and Linux are available in the [releases section](https:\u002F\u002Fgithub.com\u002Ffeschber\u002Flan-mouse\u002Freleases).\nFor Windows, the depenedencies are included in the .zip file, for other operating systems see [Installing Dependencies](#installing-dependencies-for-development--compiling-from-source).\n\nAlternatively, the `lan-mouse` binary can be compiled from source (see below).\n\n### Installing desktop file, app icon and firewall rules (optional)\n```sh\n# install lan-mouse (replace path\u002Fto\u002F with the correct path)\nsudo cp path\u002Fto\u002Flan-mouse \u002Fusr\u002Flocal\u002Fbin\u002F\n\n# install app icon\nsudo mkdir -p \u002Fusr\u002Flocal\u002Fshare\u002Ficons\u002Fhicolor\u002Fscalable\u002Fapps\nsudo cp lan-mouse-gtk\u002Fresources\u002Fde.feschber.LanMouse.svg \u002Fusr\u002Flocal\u002Fshare\u002Ficons\u002Fhicolor\u002Fscalable\u002Fapps\n\n# update icon cache\ngtk-update-icon-cache \u002Fusr\u002Flocal\u002Fshare\u002Ficons\u002Fhicolor\u002F\n\n# install desktop entry\nsudo mkdir -p \u002Fusr\u002Flocal\u002Fshare\u002Fapplications\nsudo cp de.feschber.LanMouse.desktop \u002Fusr\u002Flocal\u002Fshare\u002Fapplications\n\n# when using firewalld: install firewall rule\nsudo cp firewall\u002Flan-mouse.xml \u002Fetc\u002Ffirewalld\u002Fservices\n# -> enable the service in firewalld settings\n```\n\nInstead of downloading from the releases, the `lan-mouse` binary\ncan be easily compiled via cargo or nix:\n\n### Compiling and installing manually:\n```sh\n# compile in release mode\ncargo build --release\n\n# install lan-mouse\nsudo cp target\u002Frelease\u002Flan-mouse \u002Fusr\u002Flocal\u002Fbin\u002F\n```\n\n### Compiling and installing via cargo:\n```sh\n# will end up in ~\u002F.cargo\u002Fbin\ncargo install lan-mouse\n```\n\n### Compiling and installing via nix:\n```sh\n# you can find the executable in result\u002Fbin\u002Flan-mouse\nnix-build\n```\n### Conditional compilation\nSupport for other platforms is omitted automatically based on the active\nrust toolchain.\n\nAdditionally, available backends and frontends can be configured manually via\n[cargo features](https:\u002F\u002Fdoc.rust-lang.org\u002Fcargo\u002Freference\u002Ffeatures.html).\n\nE.g. if only support for sway is needed, the following command produces\nan executable with support for only the `layer-shell` capture backend\nand `wlroots` emulation backend:\n```sh\ncargo build --no-default-features --features layer_shell_capture,wlroots_emulation\n```\nFor a detailed list of available features, checkout the [Cargo.toml](.\u002FCargo.toml)\n\u003C\u002Fdetails>\n\n\n\n## Development\n\n### Git pre-commit hook\n\nThis repository includes a local git hooks directory `.githooks\u002F` with a `pre-commit` script that enforces formatting, lints, and tests before allowing a commit.  It is optional to enable it, but it will prevent you from committing code with failing unit tests or that needs clippy\u002Ffmt fixes. To enable the hook locally:\n\n1. Make the hook executable:\n\n```sh\nchmod +x .githooks\u002Fpre-commit\n```\n\n2. Point git to the hooks directory (one-time per clone):\n\n```sh\ngit config core.hooksPath .githooks\n```\n\nThe `pre-commit` script runs `cargo fmt --all` (and fails if files were modified), `cargo clippy --workspace --all-targets --all-features -- -D warnings`, and `cargo test --workspace --all-features`.\n\n### Dependencies & Compiling from Source\n\u003Cdetails>\n    \u003Csummary>MacOS\u003C\u002Fsummary>\n\n```sh\n# Install dependencies\nbrew install libadwaita pkg-config imagemagick\ncargo install cargo-bundle\n# Create the macOS icon file\nscripts\u002Fmakeicns.sh\n# Create the .app bundle\ncargo bundle\n# Copy all dynamic libraries into the bundle, and update the bundle to find them there\nscripts\u002Fcopy-macos-dylib.sh\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n    \u003Csummary>Ubuntu and derivatives\u003C\u002Fsummary>\n\n```sh\nsudo apt install libadwaita-1-dev libgtk-4-dev libx11-dev libxtst-dev\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n    \u003Csummary>Arch and derivatives\u003C\u002Fsummary>\n\n```sh\nsudo pacman -S libadwaita gtk libx11 libxtst\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n    \u003Csummary>Fedora and derivatives\u003C\u002Fsummary>\n\n```sh\nsudo dnf install libadwaita-devel libXtst-devel libX11-devel\n```\n\u003C\u002Fdetails>\n\u003Cdetails>\n    \u003Csummary>Nix\u003C\u002Fsummary>\n\n```sh\nnix-shell .\n```\n\u003C\u002Fdetails>\n\u003Cdetails>\n    \u003Csummary>Nix (flake)\u003C\u002Fsummary>\n\n```sh\nnix develop\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n    \u003Csummary>Windows\u003C\u002Fsummary>\n\n- First install [Rust](https:\u002F\u002Fwww.rust-lang.org\u002Ftools\u002Finstall).\n\n- Then follow the instructions at [gtk-rs.org](https:\u002F\u002Fgtk-rs.org\u002Fgtk4-rs\u002Fstable\u002Flatest\u002Fbook\u002Finstallation_windows.html)\n\n*TLDR:*\n\nBuild gtk from source\n\n- The following commands should be run in an **admin power shell** instance:\n```sh\n# install chocolatey\nSet-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https:\u002F\u002Fcommunity.chocolatey.org\u002Finstall.ps1'))\n\n# install gvsbuild dependencies\nchoco install python git msys2 visualstudio2022-workload-vctools\n```\n\n- The following commands should be run in a **regular power shell** instance:\n\n```sh\n# install gvsbuild with python\npython -m pip install --user pipx\npython -m pipx ensurepath\n```\n\n- Relaunch your powershell instance so the changes in the environment are reflected.\n```sh\npipx install gvsbuild\n\n# build gtk + libadwaita\ngvsbuild build gtk4 libadwaita librsvg adwaita-icon-theme\n```\n\n- **Make sure to add the directory** `C:\\gtk-build\\gtk\\x64\\release\\bin`\n[**to the `PATH` environment variable**]((https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fprevious-versions\u002Foffice\u002Fdeveloper\u002Fsharepoint-2010\u002Fee537574(v=office.14))). Otherwise the project will fail to build.\n\nTo avoid building GTK from source, it is possible to disable\nthe gtk frontend (see conditional compilation).\n\u003C\u002Fdetails>\n\n## Usage\n\u003Cdetails>\n    \u003Csummary>Gtk Frontend\u003C\u002Fsummary>\n\nBy default the gtk frontend will open when running `lan-mouse`.\n\nTo connect a device you want to control, simply click the `Add` button and enter the hostname\nof the device.\n\nOn the *remote* device, authorize your *local* device for incoming traffic using the `Authorize` button\nunder the \"Incoming Connections\" section.\nThe fingerprint for authorization can be found under the general section of your *local* device.\nIt is of the form \"aa:bb:cc:...\"\n\nAuthorized devices can be persisted using the configuration file (see [Configuration](#configuration)).\n\nIf the device still can not be entered, make sure you have UDP port `4242` (or the one selected) opened up in your firewall.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n    \u003Csummary>Command Line Interface\u003C\u002Fsummary>\n\nThe cli interface can be accessed by passing `cli` as a commandline argument.\nUse\n```sh\nlan-mouse cli help\n```\n to list the available commands and\n```sh\nlan-mouse cli \u003Ccmd> help\n```\nfor information on how to use a specific command.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n    \u003Csummary>Daemon Mode\u003C\u002Fsummary>\n\nLan Mouse can be launched in daemon mode to keep it running in the background (e.g. for use in a systemd-service).\n\nTo do so, use the `daemon` subcommand:\n\n```sh\nlan-mouse daemon\n```\n\u003C\u002Fdetails>\n\n## Systemd Service\n\nIn order to start lan-mouse with a graphical session automatically,\nthe [systemd-service](service\u002Flan-mouse.service) can be used:\n\nCopy the file to `~\u002F.config\u002Fsystemd\u002Fuser\u002F` and enable the service:\n\n```sh\ncp service\u002Flan-mouse.service ~\u002F.config\u002Fsystemd\u002Fuser\nsystemctl --user daemon-reload\nsystemctl --user enable --now lan-mouse.service\n```\n> [!Important]\n> Make sure to point `ExecStart=\u002Fusr\u002Fbin\u002Flan-mouse daemon` to the actual `lan-mouse` binary (in case it is not under `\u002Fusr\u002Fbin`, e.g. when installed manually.\n\n\n## Configuration\nTo automatically load clients on startup, the file `$XDG_CONFIG_HOME\u002Flan-mouse\u002Fconfig.toml` is parsed.\n`$XDG_CONFIG_HOME` defaults to `~\u002F.config\u002F`.\n\nTo create this file you can copy the following example config:\n\n### Example config\n> [!TIP]\n> key symbols in the release bind are named according\n> to their names in [input-event\u002Fsrc\u002Fscancode.rs#L172](input-event\u002Fsrc\u002Fscancode.rs#L176).\n> This is bound to change\n\n```toml\n# example configuration\n\n# configure release bind\nrelease_bind = [ \"KeyA\", \"KeyS\", \"KeyD\", \"KeyF\" ]\n\n# optional port (defaults to 4242)\nport = 4242\n\n# list of authorized tls certificate fingerprints that\n# are accepted for incoming traffic\n[authorized_fingerprints]\n\"bc:05:ab:7a:a4:de:88:8c:2f:92:ac:bc:b8:49:b8:24:0d:44:b3:e6:a4:ef:d7:0b:6c:69:6d:77:53:0b:14:80\" = \"iridium\"\n\n# define a client on the right side with host name \"iridium\"\n[[clients]]\n# position (left | right | top | bottom)\nposition = \"right\"\n# hostname\nhostname = \"iridium\"\n# activate this client immediately when lan-mouse is started\nactivate_on_startup = true\n# optional list of (known) ip addresses\nips = [\"192.168.178.156\"]\n\n# define a client on the left side with IP address 192.168.178.189\n[[clients]]\nposition = \"left\"\n# The hostname is optional: When no hostname is specified,\n# at least one ip address needs to be specified.\nhostname = \"thorium\"\n# ips for ethernet and wifi\nips = [\"192.168.178.189\", \"192.168.178.172\"]\n# optional port\nport = 4242\n```\n\nWhere `left` can be either `left`, `right`, `top` or `bottom`.\n\n## Roadmap\n- [x] Graphical frontend (gtk + libadwaita)\n- [x] respect xdg-config-home for config file location.\n- [x] IP Address switching\n- [x] Liveness tracking Automatically ungrab mouse when client unreachable\n- [x] Liveness tracking: Automatically release keys, when server offline\n- [x] MacOS KeyCode Translation\n- [x] Libei Input Capture\n- [x] MacOS Input Capture\n- [x] Windows Input Capture\n- [x] Encryption\n- [ ] X11 Input Capture\n- [ ] Latency measurement and visualization\n- [ ] Bandwidth usage measurement and visualization\n- [ ] Clipboard support\n\n\n## Detailed OS Support\n\nIn order to use a device for sending events, an **input-capture** backend is required, while receiving events requires\na supported **input-emulation** *and* **input-capture** backend.\n\nA suitable backend is chosen automatically based on the active desktop environment \u002F compositor.\n\nThe following sections detail the emulation and capture backends provided by lan-mouse and their support in desktop environments \u002F operating systems.\n\n### Input Emulation Support\n\n| Desktop \u002F Backend         | wlroots                  | libei                    | remote-desktop portal    | windows                  |   macos                                | x11                |\n|---------------------------|--------------------------|--------------------------|--------------------------|--------------------------|----------------------------------------|--------------------|\n| Wayland (wlroots)         | :heavy_check_mark:       |                          |                          |                          |                                        |                    |\n| Wayland (KDE)             |                          | :heavy_check_mark:       | :heavy_check_mark:       |                          |                                        |                    |\n| Wayland (Gnome)           |                          | :heavy_check_mark:       | :heavy_check_mark:       |                          |                                        |                    |\n| Windows                   |                          |                          |                          | :heavy_check_mark:       |                                        |                    |\n| MacOS                     |                          |                          |                          |                          |   :heavy_check_mark:                   |                    |\n| X11                       |                          |                          |                          |                          |                                        | :heavy_check_mark: |\n\n- `wlroots`: This backend makes use of the [wlr-virtual-pointer-unstable-v1](https:\u002F\u002Fwayland.app\u002Fprotocols\u002Fwlr-virtual-pointer-unstable-v1) and [virtual-keyboard-unstable-v1](https:\u002F\u002Fwayland.app\u002Fprotocols\u002Fvirtual-keyboard-unstable-v1) protocols and is supported by most wlroots based compositors.\n- `libei`: This backend uses [libei](https:\u002F\u002Fgitlab.freedesktop.org\u002Flibinput\u002Flibei) and is supported by GNOME >= 45 or KDE Plasma >= 6.1.\n- `xdp`: This backend uses the [freedesktop remote-desktop-portal](https:\u002F\u002Fflatpak.github.io\u002Fxdg-desktop-portal\u002F#gdbus-org.freedesktop.portal.RemoteDesktop) and is supported on GNOME and Plasma.\n- `x11`: Backend for X11 sessions.\n- `windows`: Backend for Windows.\n- `macos`: Backend for MacOS.\n\n\n\n### Input Capture Support\n\n| Desktop \u002F Backend         | layer-shell              | libei                    | windows                  |   macos                                | x11 |\n|---------------------------|--------------------------|--------------------------|--------------------------|----------------------------------------|-----|\n| Wayland (wlroots)         | :heavy_check_mark:       |                          |                          |                                        |     |\n| Wayland (KDE)             | :heavy_check_mark:       | :heavy_check_mark:       |                          |                                        |     |\n| Wayland (Gnome)           |                          | :heavy_check_mark:       |                          |                                        |     |\n| Windows                   |                          |                          | :heavy_check_mark:       |                                        |     |\n| MacOS                     |                          |                          |                          |   :heavy_check_mark:                   |     |\n| X11                       |                          |                          |                          |                                        | WIP |\n\n- `layer-shell`: This backend creates a single pixel wide window on the edges of Displays to capture the cursor using the [layer-shell protocol](https:\u002F\u002Fwayland.app\u002Fprotocols\u002Fwlr-layer-shell-unstable-v1).\n- `libei`: This backend uses [libei](https:\u002F\u002Fgitlab.freedesktop.org\u002Flibinput\u002Flibei) and is supported by GNOME >= 45 or KDE Plasma >= 6.1.\n- `windows`: Backend for input capture on Windows.\n- `macos`: Backend for input capture on MacOS.\n- `x11`: TODO (not yet supported)\n","Lan Mouse 是一款跨平台的鼠标和键盘共享软件，支持通过局域网将一套输入设备应用于多台计算机上。其核心功能包括高效的数据传输、易于使用的图形界面（基于GTK）以及对多种操作系统和桌面环境的支持，如Windows、macOS、Linux等。该项目采用Rust语言编写，确保了高性能与安全性，并且使用DTLS加密所有网络通信以保障数据安全。适用于需要在多台计算机间无缝切换操作的场景，例如家庭办公室或企业工作站中希望减少桌面杂乱度同时提高工作效率的情况。",2,"2026-06-11 03:05:00","top_language"]