obv-mikhail/InputBot
소개
전역 단축키를 만들고 입력을 시뮬레이션하는 Rust 라이브러리
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalInputBot

Cross-platform (Windows & Linux) library for simulating keyboard/mouse input events and registering global input device event handlers.
Allows writing automation programs that collapse long action-sequences into single key-presses.
Usage
[dependencies]
inputbot = "0.6"
use inputbot::{KeySequence, KeybdKey::*, MouseButton::*};
use std::{thread::sleep, time::Duration};
fn main() {
// Bind the number 1 key your keyboard to a function that types
// "Hello, world!" when pressed.
Numrow1Key.bind(|| KeySequence("Hello, world!").send());
// Bind your caps lock key to a function that starts an autoclicker.
CapsLockKey.bind(move || {
while CapsLockKey.is_toggled() {
LeftButton.press();
LeftButton.release();
sleep(Duration::from_millis(30));
}
});
// Call this to start listening for bound inputs.
inputbot::handle_input_events(false);
}
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:
[dependencies]
inputbot = { git = "https://github.com/obv-mikhail/InputBot", branch = "develop" }
Check out examples for comprehensive examples on how to use each feature.
Build Dependencies
Note: libinput requires InputBot to be run with sudo on Linux - sudo ./target/debug/<program name>.
Debian/Ubuntu based distros
- libx11-dev
- libxtst-dev
- libudev-dev
- libinput-dev
NixOs/Nix
Examples
You can run the included examples by cloning the library and running cargo run --example <example name>. Similar to the note above, on Linux you have to run cargo build --examples && sudo ./target/debug/<example name>.
This is especially useful for testing the library when contributing.
관련 프로젝트 살펴보기
불러오는 중…