From 227a5a67b1d8a6bd102bc670f70feba443abdb98 Mon Sep 17 00:00:00 2001 From: Joscha Date: Tue, 26 Jul 2022 13:30:14 +0200 Subject: [PATCH] Get rid of shift+q for closing cove I'd like to be able to type a capital Q in text fields. --- src/ui.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ui.rs b/src/ui.rs index 8650021..fef6b3f 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -193,10 +193,11 @@ impl Ui { terminal: &mut Terminal, crossterm_lock: &Arc>, ) -> EventHandleResult { - // Always exit when shift+q or ctrl+c are pressed - let shift_q = event.code == KeyCode::Char('Q'); + // Always exit when ctrl+c is pressed. Previously, shift+q would also + // unconditionally quit cove, but that interfered with typing text in + // inline editors. let ctrl_c = event.modifiers == KeyModifiers::CONTROL && event.code == KeyCode::Char('c'); - if shift_q || ctrl_c { + if ctrl_c { return EventHandleResult::Stop; }