{"id":13815591,"url":"https://github.com/obv-mikhail/InputBot","last_synced_at":"2025-05-15T09:32:40.853Z","repository":{"id":22014817,"uuid":"94721049","full_name":"obv-mikhail/InputBot","owner":"obv-mikhail","description":"Rust library for creating global hotkeys, and simulating inputs","archived":false,"fork":false,"pushed_at":"2024-10-27T16:01:21.000Z","size":220,"stargazers_count":410,"open_issues_count":37,"forks_count":74,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2024-10-27T18:47:08.089Z","etag":null,"topics":["emulating-inputs","global-hooks","hotkeys","keybinding","keyboard-emulation","mouse-emulation","rust-library"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/obv-mikhail.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-19T00:24:42.000Z","updated_at":"2024-10-27T16:01:25.000Z","dependencies_parsed_at":"2022-07-04T11:13:07.823Z","dependency_job_id":"a22291dd-53a7-4da0-8a0f-ab1aa1542aa4","html_url":"https://github.com/obv-mikhail/InputBot","commit_stats":{"total_commits":133,"total_committers":23,"mean_commits":5.782608695652174,"dds":"0.30827067669172936","last_synced_commit":"f5e94cad04779f0d43ebcf07ef313ead5c1ef233"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obv-mikhail%2FInputBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obv-mikhail%2FInputBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obv-mikhail%2FInputBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obv-mikhail%2FInputBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/obv-mikhail","download_url":"https://codeload.github.com/obv-mikhail/InputBot/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225342797,"owners_count":17459475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emulating-inputs","global-hooks","hotkeys","keybinding","keyboard-emulation","mouse-emulation","rust-library"],"created_at":"2024-08-04T04:03:38.372Z","updated_at":"2024-11-19T11:30:46.018Z","avatar_url":"https://github.com/obv-mikhail.png","language":"Rust","readme":"# InputBot [![docs link](https://docs.rs/inputbot/badge.svg)](https://docs.rs/inputbot) [![crates.io version](https://img.shields.io/crates/v/inputbot.svg)](https://crates.io/crates/inputbot) \nCross-platform (Windows \u0026 Linux) library for simulating keyboard/mouse input events and registering global input device event handlers.\n\nAllows writing automation programs that collapse long action-sequences into single key-presses.\n\n## Usage\n\n```toml\n[dependencies]\ninputbot = \"0.6\"\n```\n\n```rust\nuse inputbot::{KeySequence, KeybdKey::*, MouseButton::*};\nuse std::{thread::sleep, time::Duration};\n\nfn main() {\n    // Bind the number 1 key your keyboard to a function that types \n    // \"Hello, world!\" when pressed.\n    Numrow1Key.bind(|| KeySequence(\"Hello, world!\").send());\n\n    // Bind your caps lock key to a function that starts an autoclicker.\n    CapsLockKey.bind(move || {\n        while CapsLockKey.is_toggled() {\n            LeftButton.press();\n            LeftButton.release();\n\n            sleep(Duration::from_millis(30));\n        }\n    });\n\n    // Call this to start listening for bound inputs.\n    inputbot::handle_input_events(false);\n}\n```\n\n*NOTE: The README and examples are based off the `develop` branch of InputBot. If a feature is not working, you are probably using the version from crates.io. If you want to use the latest build, add this to your Cargo.toml:*\n\n```toml\n[dependencies]\ninputbot = { git = \"https://github.com/obv-mikhail/InputBot\", branch = \"develop\" }\n```\n\nCheck out **[examples](/examples)** for comprehensive examples on how to use each feature.\n\n## Build Dependencies\n**Note:** libinput requires InputBot to be run with sudo on Linux - `sudo ./target/debug/\u003cprogram name\u003e`.\n\n### Debian/Ubuntu based distros\n\n* **libx11-dev**\n* **libxtst-dev**\n* **libudev-dev**\n* **libinput-dev**\n\n### [NixOs/Nix](flake.nix)\n\n## Examples\n\nYou can run the included examples by cloning the library and running `cargo run --example \u003cexample name\u003e`. Similar to the note above, on Linux you have to run `cargo build --examples \u0026\u0026 sudo ./target/debug/\u003cexample name\u003e`.\n\nThis is especially useful for testing the library when contributing.\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobv-mikhail%2FInputBot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobv-mikhail%2FInputBot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobv-mikhail%2FInputBot/lists"}