sysinputs 0.0.5

Generate native system input events.
docs.rs failed to build sysinputs-0.0.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

sysinputs

Generate native system input events. Currently windows only.

Contributions welcome!

Examples

extern crate sysinputs;

// simple
use sysinputs::keyboard::{send_char, send_str};
// medium
use sysinputs::keyboard::{send_combo, send_key, Key, Physical};
// complicated
use sysinputs::keyboard::{press_key, release_key};

fn main() {
    // simple
    send_str("echo FOO bar\n");
    send_char('\n');

    // medium
    send_combo(&[
        Key::Physical(Physical::E),
        Key::Unicode('c'),
        Key::Unicode('h'),
        Key::Unicode('o'),
    ]);
    send_key(Key::Physical(Physical::Return));

    // complicated
    press_key(Key::Physical(Physical::Shift));
    send_combo(&[
        Key::Physical(Physical::E),
        Key::Unicode('c'),
        Key::Unicode('h'),
        Key::Unicode('o'),
    ]);
    release_key(Key::Physical(Physical::Shift));
    send_key(Key::Physical(Physical::Return));
}

Development

  • Only supports Windows right now. PRs adding MacOS, Linux, and other OS are welcome!