| Crates.io | penput |
| lib.rs | penput |
| version | 0.3.1 |
| created_at | 2025-12-11 20:10:31.305093+00 |
| updated_at | 2025-12-16 10:58:49.561424+00 |
| description | Penput turns your mobile/tablet into a wireless touchpad for your PC. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1980496 |
| size | 141,166 |
Penput turns your mobile/tablet into a wireless touchpad for your PC. The app serves a minimal UI over HTTP, streams touch coordinates via WebSocket, and maps them to absolute mouse positions on the host machine.
release trigger GitHub Actions to run cargo build --release, create a GitHub Release, and upload the binary.github/workflows/release-build.yml)--port, default 8080): serves HTML/JS/CSS.--ws-port, default 9001):
init JSON → captures client screen sizex:u16 | y:u16) → maps to host absolute mouse position--udp-port, default 9002):
HELLO/MOVE/PING binary packets from the iOS native clienty/n.rustup default stable
cargo build
# or
cargo install penput
cargo run -- --port 8080 --ws-port 9001 --udp-port 9002
--auto-approve: skip manual approvalThis project now supports an iOS native UDP client (recommended when WebKit-based browsers stutter).
udp://<PC_IP>:9002 by defaultClient → Server:
HELLO (0x01): [0x01][w:u16][h:u16]MOVE (0x02): [0x02][x:u16][y:u16]PING (0x03): [0x03][t:u64] (client timestamp in ms)Server → Client:
ACCEPT (0x10): [0x10]REJECT (0x11): [0x11]BUSY (0x12): [0x12] (another client is already connected)PONG (0x13): [0x13][t:u64] (echoed timestamp)Notes:
The repository contains an iOS SwiftUI skeleton under:
ios/PenputIOSClient/It uses:
Network.framework (NWConnection over UDP)UIViewRepresentable touch surface for low-overhead touch captureCADisplayLink to pace sends (latest-value only)iOS requires a local network usage prompt for LAN UDP/TCP traffic.
Add NSLocalNetworkUsageDescription to Info.plist in your Xcode project, e.g.:
iOS apps must be signed. Without the paid Apple Developer Program you can still test, but usually the app expires every ~7 days.
Practical approach while you don't have a Mac:
http://192.168.0.10:8080).http://<PC_IP>:8080/?ws=9001.{"type":"init","width":<u16>,"height":<u16>}x:u16, y:u16 (client viewport absolute coords)[HH:MM:SS] 📱 Connection request from <IP>y/yes → approve, anything else/EOF → rejectrequestAnimationFrame-bounded sends; normalized coords packed to u16Workflow: .github/workflows/release-build.yml
releasecargo build --release → create GitHub Release (tag release-<sha>) → upload target/release/penputGITHUB_TOKEN?ws=<port> matches actual WS port.