Function bevy_input::keyboard::keyboard_input_system
source · pub fn keyboard_input_system(
key_input: ResMut<'_, ButtonInput<KeyCode>>,
keyboard_input_events: EventReader<'_, '_, KeyboardInput>
)
Expand description
Updates the ButtonInput<KeyCode>
resource with the latest KeyboardInput
events.
Differences
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
.