diff options
author | Sathish <tsatiz@gmail.com> | 2019-06-07 15:28:16 +0530 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2019-06-07 16:57:07 +0530 |
commit | eae992fbf0b0f0adaf8feffcb0e4903deabc562e (patch) | |
tree | 368a501e870f1c0140f4fa59486266b72308c396 /src/interactive/app | |
parent | 3b717634364647139388dffd0d68ce6c9729eee9 (diff) |
Fixed Up and Down key inputs and added Left and Right for Ascent and Descent navigation
Diffstat (limited to 'src/interactive/app')
-rw-r--r-- | src/interactive/app/eventloop.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/interactive/app/eventloop.rs b/src/interactive/app/eventloop.rs index b7e454c..56a2bd9 100644 --- a/src/interactive/app/eventloop.rs +++ b/src/interactive/app/eventloop.rs @@ -78,8 +78,7 @@ impl TerminalApp { B: Backend, R: io::Read + TermReadEventsAndRaw, { - use termion::event::Key::{Backspace, Char, Ctrl, Esc}; - use CursorDirection::*; + use termion::event::Key::*; use FocussedPane::*; self.draw(terminal)?; @@ -111,11 +110,11 @@ impl TerminalApp { Char('O') => self.open_that(), Char(' ') => self.mark_entry(false), Char('d') => self.mark_entry(true), - Char('u') | Backspace => self.exit_node(), - Char('o') | Char('\n') => self.enter_node(), - Ctrl('u') => self.change_entry_selection(CursorDirection::PageUp), - Char('k') => self.change_entry_selection(Up), - Char('j') => self.change_entry_selection(Down), + Char('u') | Backspace | Left => self.exit_node(), + Char('o') | Char('\n') | Right => self.enter_node(), + Ctrl('u') => self.change_entry_selection(CursorDirection::PageUp), + Char('k') | Up => self.change_entry_selection(CursorDirection::Up), + Char('j') | Down => self.change_entry_selection(CursorDirection::Down), Ctrl('d') => self.change_entry_selection(CursorDirection::PageDown), Char('s') => self.cycle_sorting(), Char('g') => self.display.byte_vis.cycle(), |