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 | |
parent | 3b717634364647139388dffd0d68ce6c9729eee9 (diff) |
Fixed Up and Down key inputs and added Left and Right for Ascent and Descent navigation
-rw-r--r-- | src/interactive/app/eventloop.rs | 13 | ||||
-rw-r--r-- | src/interactive/widgets/help.rs | 4 |
2 files changed, 8 insertions, 9 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(), diff --git a/src/interactive/widgets/help.rs b/src/interactive/widgets/help.rs index 652cf48..bfe5563 100644 --- a/src/interactive/widgets/help.rs +++ b/src/interactive/widgets/help.rs @@ -103,8 +103,8 @@ impl HelpPane { { hotkey("j/<down>", "move down an entry", None); hotkey("k/<up>", "move up an entry", None); - hotkey("o/<enter>", "descent into the selected directory", None); - hotkey("u", "ascent one level into the parent directory", None); + hotkey("o/<enter>/<right>", "descent into the selected directory", None); + hotkey("u/<left>", "ascent one level into the parent directory", None); hotkey("<backspace>", "^", None); hotkey("Ctrl + d", "move down 10 entries at once", None); hotkey("<Page Down>", "^", None); |