{"repo":"not-elm/bevy-input-sequence","free":true,"listed":false,"github":"https://github.com/not-elm/bevy-input-sequence","clone":"git clone https://github.com/not-elm/bevy-input-sequence.git","description":"This crate provides reading user input sequences, and sending event","language":"Rust","stars":17,"topics":["bevy-plugin","rust","bevy"],"license":"Apache-2.0","category":"game-templates","readme_excerpt":"bevy-input-sequence Recognizes and acts on input sequences from the keyboard or a gamepad. Use Cases Hotkeys Cheat codes Developer UI Installation Code Examples Here are some code snippets. These also run as doctests so they do a few things differently than a regular runnable example: - Instead of DefaultPlugins they use MinimalPlugins . - Instead of app.run() they call app.update() . The next section describes the runnable examples that come with the crate. Run a System on a Key Sequence Run a system whenever the user presses the key sequence H I or \"hi\" within a time limit. Send an Event on Key Sequence Originally bevy-input-sequence always sent an event. You can still do that with action::write message() . Send an Event on Gamepad Button Sequence Gamepads have something that keyboards don't: identity problems. Which player hit the button sequence may be important to know. So the systems it accepts take an input of Entity . Trigger an Event on Key Sequence You can also trigger an event with action::trigger() or action::trigger targets() . KeySequence Creation Patterns KeySequence::new now returns KeySequenceBuilder , which implements Command . Therefore, you need to call Commands::queue instead of Commands::spawn . Advanced Creation The KeySequenceBuilder requires a &mut World to build it. You can build it yourself like so: Runnable Examples keycode The keycode example recognizes the key sequences W D S A and W A S D and fires a distinct event. keymod The keymod example rec","default_branch":null,"files":null,"tree":[],"storefront":"/r/not-elm","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/not-elm/bevy-input-sequence/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}