Skip to content

Commit

Permalink
Fixed Up and Down key inputs and added Left and Right for Ascent and …
Browse files Browse the repository at this point in the history
…Descent navigation
  • Loading branch information
tsathishkumar authored and Byron committed Jun 7, 2019
1 parent 3b71763 commit eae992f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions src/interactive/app/eventloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions src/interactive/widgets/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eae992f

Please sign in to comment.