jetkvm_client
jetkvm_client is a Rust client library for interacting with JetKVM devices using WebRTC and JSON‑RPC. It provides functionality to authenticate with a JetKVM device, set up a WebRTC PeerConnection with a DataChannel, and send various input events (keyboard and mouse) as well as receive notifications (such as screen resolution updates) from the device.
This is a fork of the original jetkvm_control by David Horner. Thank you for your work!
New Goals
The goal of this library is to be able to do programatically whatever a jetkvm user can do via the web interface.
TODO
- Screen capture (screenshot and video)
Features
- Keyboard Input: Functions for sending keyboard events including text, control combinations (Ctrl-A, Ctrl-C, Ctrl-V, Ctrl-X, etc.), and special keys (Return, Windows key, etc.).
- Mouse Control: Functions for absolute mouse movement, clicks (left, right, middle), double-click, and click-and-drag actions.
Installation
-
Install via cargo
cargo install jetkvm_client- or -
Clone the Repository
git clone https://github.com/nilp0inter/jetkvm_client.git cd jetkvm_client -
Running the Project You can build and run the project with Cargo:
About the cmdline client
The client (cargo run/jetkvm_client) is a simple client that connects to the JetKVM device, performs a few RPC calls to get device information, and then disconnects.
A client for JetKVM over WebRTC.
Usage: jetkvm_client [OPTIONS]
Options:
-H, --host <HOST> The host address to connect to
-p, --port <PORT> The port number to use
-a, --api <API> The API endpoint
-P, --password <PASSWORD> The password for authentication
-v, --verbose Enable verbose logging (include logs from webrtc_sctp)
-h, --help Print help
-V, --version Print version
What's the code look like
The api is subject to change. This project adheres to the "Semantic Versioning" standard.
example code for rust:
let config = JetKvmConfig ;
let mut client = new;
if let Err = client.connect.await
// open notepad and say Hello World, copy and paste.
send_windows_key.await.ok;
sleep.await;
rpc_sendtext.await.ok;
sleep.await;
send_return.await.ok;
sleep.await;
rpc_sendtext.await.ok;
sleep.await;
send_ctrl_a.await.ok;
sleep.await;
send_ctrl_x.await.ok;
sleep.await;
send_ctrl_v.await.ok;
sleep.await;
send_return.await.ok;
sleep.await;
send_ctrl_v.await.ok;
Contributions
- 5/1/25 - Senator3223/JetKey - use python to control your JetKVM using an api very similiar to jetkvm_client.
License
This project is licensed under the MIT License. See LICENSE for details.
Contributing
Contributions are welcome! Please submit a pull request or open an issue to discuss changes.