From aa9850766bc208fbdab556b935e100ed90b680be Mon Sep 17 00:00:00 2001 From: nyx Date: Mon, 7 Oct 2024 18:52:23 -0400 Subject: [PATCH] add ``ctrl + c`` exiting Co-authored-by: Adam Perkowski --- tui/src/state.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tui/src/state.rs b/tui/src/state.rs index 6f8bef83..b4b7ddb6 100644 --- a/tui/src/state.rs +++ b/tui/src/state.rs @@ -418,6 +418,12 @@ impl AppState { return false; } + if matches!(self.focus, Focus::ConfirmationPrompt(_)) + && (key.modifiers.contains(KeyModifiers::CONTROL) && key.code == KeyCode::Char('c')) + { + return false; + } + // If UI is not drawable returning true will mark as the key handled if !self.drawable { return true;