bevy 0.18.1

A refreshingly simple data-driven game engine and app framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Prints out all keyboard events.

use bevy::{input::keyboard::KeyboardInput, prelude::*};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Update, print_keyboard_event_system)
        .run();
}

/// This system prints out all keyboard inputs as they come in
fn print_keyboard_event_system(mut keyboard_inputs: MessageReader<KeyboardInput>) {
    for keyboard_input in keyboard_inputs.read() {
        info!("{:?}", keyboard_input);
    }
}