From a91472045233160b667ac5112c4a85bfed4f9a95 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Sat, 11 Feb 2023 11:43:39 -0330 Subject: trig functions for radians & degrees --- src/input.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/input.rs') diff --git a/src/input.rs b/src/input.rs index ab4a1d1..2f9d820 100644 --- a/src/input.rs +++ b/src/input.rs @@ -12,17 +12,17 @@ impl Calculator { _ => {} }, KeyModifiers::SHIFT => match key.code { - KeyCode::Char('D') => self.clear(), - _ => {} - }, - KeyModifiers::NONE => match key.code { - KeyCode::Char('q') => { + KeyCode::Char('Q') => { return Signal::Exit; } - KeyCode::Char('j' | 'k') => self.swap(), - KeyCode::Char('d') => { + KeyCode::Char('J' | 'K') => self.swap(), + KeyCode::Char('D') => { self.input_buffer = String::new(); } + KeyCode::Char('C') => self.clear(), + _ => {} + }, + KeyModifiers::NONE => match key.code { KeyCode::Char(c) => self.push_to_buffer(c), KeyCode::Backspace => { self.input_buffer.pop(); -- cgit v1.2.3