Function bevy::input::keyboard::keyboard_input_system

pub fn keyboard_input_system(
    key_input: ResMut<'_, ButtonInput<KeyCode>>,
    keyboard_input_events: EventReader<'_, '_, KeyboardInput>,
    focus_events: EventReader<'_, '_, KeyboardFocusLost>,
Expand description

Updates the ButtonInput<KeyCode> resource with the latest KeyboardInput events.


The main difference between the KeyboardInput event and the ButtonInput<KeyCode> resources is that the latter have convenient functions such as ButtonInput::pressed, ButtonInput::just_pressed and ButtonInput::just_released.