diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-12-14 14:16:12 +0200 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-12-14 14:16:12 +0200 |
commit | 18a8d22b85375c4b4cecd00a1aafda670fc1f19e (patch) | |
tree | 162f207670c2fb4cfdd757292ef0d1f0bbbb883c /ui/src/components/mail/listing.rs | |
parent | 41a4de394a26d52509fb4db6f65f9c87b6d2095a (diff) |
ui/shortcuts: Replace arrow key use with configurable shortcuts
Diffstat (limited to 'ui/src/components/mail/listing.rs')
-rw-r--r-- | ui/src/components/mail/listing.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/src/components/mail/listing.rs b/ui/src/components/mail/listing.rs index 72634796..ed80ec08 100644 --- a/ui/src/components/mail/listing.rs +++ b/ui/src/components/mail/listing.rs @@ -528,7 +528,9 @@ impl Component for Listing { UIEvent::Resize => { self.set_dirty(); } - UIEvent::Input(Key::Up) => { + UIEvent::Input(ref key) + if shortcut!(key == shortcuts[Listing::DESCRIPTION]["scroll_up"]) => + { let amount = if self.cmd_buf.is_empty() { 1 } else if let Ok(amount) = self.cmd_buf.parse::<usize>() { @@ -547,7 +549,9 @@ impl Component for Listing { self.component.set_movement(PageMovement::Up(amount)); return true; } - UIEvent::Input(Key::Down) => { + UIEvent::Input(ref key) + if shortcut!(key == shortcuts[Listing::DESCRIPTION]["scroll_down"]) => + { let amount = if self.cmd_buf.is_empty() { 1 } else if let Ok(amount) = self.cmd_buf.parse::<usize>() { |