Skip to content

Repository files navigation

mows — Mouse Over WebSocket

Stream mouse and keyboard events from one machine to another over WebSocket. Captures input on the client and replays it on the server.

Install

conda/mamba

./dev.sh --ibase
conda activate mows
pip install -e .

pip (requires system dependencies for pynput)

pip install .

Usage

Server (receiving machine)

Start the server on the machine where events should be replayed:

mows serve # defaults: 0.0.0.0:8765
mows serve --host 0.0.0.0 --port 9000

Client (sending machine)

Start the client on the machine where input is captured:

mows send # defaults: localhost:8765
mows send --host 192.168.1.50 --port 9000
mows send --suppress # block input from reaching the client OS

While connected:

  • Ctrl+Tab — toggle between ACTIVE and PAUSED
  • Ctrl+Esc — stop the client

Clipboard

Copy your local clipboard to the server (or pull the server's clipboard locally) using one-shot WebSocket connections:

mows copy-to # push local clipboard to server
mows copy-from # pull server clipboard to local
mows copy-to --host 192.168.1.50 --port 9000

Help

mows help
mows serve --help
mows send --help

Development

./dev.sh automates common development tasks. Change NAME and USER at the top before use.

./dev.sh --idev # create conda dev environment
./dev.sh -r help# run from source
./dev.sh -bp # build pip package
./dev.sh -bc # build conda package
./dev.sh -bd # build docker image

Protocol

Events are streamed as JSON over WebSocket. Mouse movement is relative (deltas), so client and server screen sizes don't need to match.

TypeFields
mouse_movedx, dy (relative)
mouse_clickbutton, pressed
mouse_scrolldx, dy
key_presskey
key_releasekey
clipboard_pushtext
clipboard_pull(request)
clipboard_datatext(response)

License

GPLv3 — see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages