Skip to content

usinput/rebind-client-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

rebind-client

Rust client for the Rebind remote access WebSocket protocol. Async, typed, built on tokio.

Install

[dependencies]
rebind-client = "0.1"

Example

use rebind_client::RebindClient;

#[tokio::main]
async fn main() -> rebind_client::Result<()> {
    let client = RebindClient::connect("ws://127.0.0.1:19561").await?;

    client.hid_move(30, -5);
    client.hid_press("Mouse1", 20);

    let (x, y) = client.system_mouse().await?;
    let pixel = client.screen_pixel(x, y).await?;

    let mut events = client.mouse_events().await?;
    while let Some(pos) = events.recv().await {
        println!("{} {}", pos.x, pos.y);
    }

    client.close().await;
    Ok(())
}

Links

About

Rust client for the Rebind WebSocket protocol

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages