Function bevy::window::close_on_esc
pub fn close_on_esc(
commands: Commands<'_, '_>,
focused_windows: Query<'_, '_, (Entity, &Window), ()>,
input: Res<'_, Input<KeyCode>>
)
Expand description
Close the focused window whenever the escape key (Esc) is pressed
This is useful for examples or prototyping.