aboutsummaryrefslogtreecommitdiffstats
path: root/src/input.rs
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2023-02-11 11:43:39 -0330
committerSam Anthony <sam@samanthony.xyz>2023-02-11 11:43:39 -0330
commita91472045233160b667ac5112c4a85bfed4f9a95 (patch)
tree836dcf4ac5f7a9e5ba5ceab79f7283173a5ebd34 /src/input.rs
parent0d9bc65be5db6a2a669c9b6b979ed79e0ecfbf9a (diff)
downloadpfc-a91472045233160b667ac5112c4a85bfed4f9a95.zip
trig functions for radians & degrees
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs14
1 files changed, 7 insertions, 7 deletions
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();