aboutsummaryrefslogtreecommitdiff
path: root/src/app/impl_view.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-01-25 09:24:51 +0000
committerAkshay <[email protected]>2021-01-25 09:24:51 +0000
commitcd03d732b1f0df6c020a94135db2db4b690a4937 (patch)
tree94da0cfb56711abb1d8344d1804882c93201902d /src/app/impl_view.rs
parent665fd3fb61891b73175690158cde38cf7f94ebc7 (diff)
handle cursor events and entry
Diffstat (limited to 'src/app/impl_view.rs')
-rw-r--r--src/app/impl_view.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/app/impl_view.rs b/src/app/impl_view.rs
index 395cac4..0ec47f1 100644
--- a/src/app/impl_view.rs
+++ b/src/app/impl_view.rs
@@ -95,6 +95,24 @@ impl View for App {
95 self.set_focus(Absolute::Down); 95 self.set_focus(Absolute::Down);
96 return EventResult::Consumed(None); 96 return EventResult::Consumed(None);
97 } 97 }
98
99 Event::Char('w') => {
100 self.move_cursor(Absolute::Up);
101 return EventResult::Consumed(None);
102 }
103 Event::Char('a') => {
104 self.move_cursor(Absolute::Left);
105 return EventResult::Consumed(None);
106 }
107 Event::Char('s') => {
108 self.move_cursor(Absolute::Down);
109 return EventResult::Consumed(None);
110 }
111 Event::Char('d') => {
112 self.move_cursor(Absolute::Right);
113 return EventResult::Consumed(None);
114 }
115
98 Event::Char('v') => { 116 Event::Char('v') => {
99 if self.habits.is_empty() { 117 if self.habits.is_empty() {
100 return EventResult::Consumed(None); 118 return EventResult::Consumed(None);