Giter Club home page Giter Club logo

kemuler's Introduction

kemuler

this crate is currently in a rapid development phase. compilation failure will probably be introduced with every 5 commits lol Update: Current API design is quite stable. But, still, it's in development :P.

Welcome to kemuler!

This crate offers a different kind of high level input simulator framework, utilizing Rust’s type system to its full potential (or just over-engineered) instead of the usual key_down(Key).

Why? Combinators!

use kemuler::prelude::*;
// use a simulator your heart desired
// (your heart must also implement one if there's none)
let mut s = Simulator::new();

// tuple supports
(
    Key::Shift.down(),

    Char('o').click(),
    // down and then up is the same as `.click`
    Char('h').down(),
    Char('h').up(),

    Char('y').click(),
    Char('e').click(),
    Char('a').click(),
    // repeat anything before the `.repeat` 5 times,
    Char('h').click().repeat(5),

    Key::Shift.up(),
)
    // `.seq` wraps the tuple with `Sequence` type to mark it as simulatable
    .seq()
    .run_with(&mut s)
// this typed the message: "OH YEAHHHHH"

Currently, there are only a few amount of combinators present. If you've got some more useful combinator, please submit an issue on GitHub!

See crate's document for more examples. Documentation currently live at https://kemuler.github.io/kemuler/kemuler.

Installation

Using Cargo command:

cargo add --git "https://github.com/kemuler/kemuler"

or add the following to your Cargo.toml dependencies:

kemuler = { git = "https://github.com/kemuler/kemuler" }

Adding kemuler on its own wouldn't do anything. You must import a simulator (means backend) or implements one to actually simulate an input. Head to Simulators section to see cooked and ready simulator to be added to your dependencies.

Assuming using kemuler-enigo since it's cross-platform.

Using Cargo command:

cargo add --git "https://github.com/kemuler/kemuler-enigo"

or add the following to your Cargo.toml dependencies:

kemuler-enigo = { git = "https://github.com/kemuler/kemuler-enigo" }

Simulators

Simulators that are being maintained by this crate.

kemuler's People

Contributors

multirious avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

tarasbuteyko

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.