pub fn input_just_pressed<T>(input: T) -> impl FnMut(Res<'_, Input<T>>)where
    T: Copy + Eq + Hash + Send + Sync + 'static,
Expand description

Run condition that is active if Input::just_pressed is true for the given input.

use bevy::prelude::*;
use bevy::input::common_conditions::input_just_pressed;
fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_system(jump.run_if(input_just_pressed(KeyCode::Space)))
        .run();
}