From b31171828339dcbcc4e9aeed6f770783f8031669 Mon Sep 17 00:00:00 2001 From: ShenMian Date: Sun, 5 Jan 2025 07:36:45 +0000 Subject: [PATCH] feat(app): add 'Q' key to exit application - Add KeyCode::Char('q') to the list of keys that trigger application exit --- src/app.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.rs b/src/app.rs index e7e411a..877fa65 100644 --- a/src/app.rs +++ b/src/app.rs @@ -110,8 +110,8 @@ impl App { async fn handle_key_events(&mut self, event: KeyEvent) -> Result<()> { match event.code { - // Exit application on `ESC` - KeyCode::Esc => { + // Exit application on `Q` or `ESC` + KeyCode::Char('q') | KeyCode::Esc => { self.request_exit(); } // Exit application on `Ctrl-C`