bevy/crates/bevy_app
Sarthak Singh f607be8777
Handle Ctrl+C in the terminal properly (#14001)
# Objective

Fixes #13995.

## Solution

Override the default `Ctrl+C` handler with one that sends `AppExit`
event to every app with `TerminalCtrlCHandlerPlugin`.

## Testing

Tested by running the `3d_scene` example and hitting `Ctrl+C` in the
terminal.

---

## Changelog

Handles `Ctrl+C` in the terminal gracefully.

## Migration Guide

If you are overriding the `Ctrl+C` handler then you should call
`TerminalCtrlCHandlerPlugin::gracefully_exit` from your handler. It will
tell the app to exit.
2024-07-01 14:08:42 +00:00
..
src Handle Ctrl+C in the terminal properly (#14001) 2024-07-01 14:08:42 +00:00
Cargo.toml Handle Ctrl+C in the terminal properly (#14001) 2024-07-01 14:08:42 +00:00
README.md add and fix shields in Readmes (#9993) 2023-10-15 00:52:31 +00:00

Bevy App

License Crates.io Downloads Docs Discord

This crate is about everything concerning the highest-level, application layer of a Bevy app.