//! Prints out all chars as they are inputted.12use bevy::{3input::keyboard::{Key, KeyboardInput},4prelude::*,5};67fn main() {8App::new()9.add_plugins(DefaultPlugins)10.add_systems(Update, print_char_event_system)11.run();12}1314/// This system prints out all char events as they come in.15fn print_char_event_system(mut char_input_events: EventReader<KeyboardInput>) {16for event in char_input_events.read() {17// Only check for characters when the key is pressed.18if !event.state.is_pressed() {19continue;20}21if let Key::Character(character) = &event.logical_key {22info!("{:?}: '{}'", event, character);23}24}25}262728