Function bevy::input::keyboard::keyboard_input_system
pub fn keyboard_input_system(
scan_input: ResMut<'_, Input<ScanCode>>,
key_input: ResMut<'_, Input<KeyCode>>,
keyboard_input_events: EventReader<'_, '_, KeyboardInput>
)
Expand description
Updates the Input<KeyCode>
resource with the latest KeyboardInput
events.
Differences
The main difference between the KeyboardInput
event and the Input<KeyCode>
or Input<ScanCode>
resources is that
the latter have convenient functions such as Input::pressed
, Input::just_pressed
and Input::just_released
.