diff options
author | ClementTsang <cjhtsang@uwaterloo.ca> | 2020-02-02 17:45:05 -0500 |
---|---|---|
committer | ClementTsang <cjhtsang@uwaterloo.ca> | 2020-02-02 17:45:05 -0500 |
commit | e98cc770a5ff4ab15b40bf0e5080bd0c412bc541 (patch) | |
tree | 8fb115e21f8ce6bc6cc213ff752ac4a888d2f404 /src | |
parent | e548d07c1f016165c206256f2c8bab1bfa4c38c5 (diff) |
Removed Ctrl-hjkl as movement between widgets as Ctrl-j seemed to be broken... replaced with Shift-arrow keys for an alternative
Diffstat (limited to 'src')
-rw-r--r-- | src/canvas.rs | 2 | ||||
-rw-r--r-- | src/main.rs | 17 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/canvas.rs b/src/canvas.rs index 58d8a09e..321d9ddd 100644 --- a/src/canvas.rs +++ b/src/canvas.rs @@ -38,7 +38,7 @@ lazy_static! { Text::raw("Ctrl-r to reset all data.\n"), Text::raw("f to toggle freezing and unfreezing the display.\n"), Text::raw( - "Ctrl-Up or Ctrl-k, Ctrl-Down or Ctrl-j, Ctrl-Left or Ctrl-h, Ctrl-Right or Ctrl-l to navigate between widgets.\n" + "Ctrl/Shift-Up, Ctrl/Shift-Down, Ctrl/Shift-Left, and Ctrl/Shift-Right to navigate between widgets.\n" ), Text::raw("Up or k and Down or j scrolls through a list.\n"), Text::raw("Esc to close a dialog window (help or dd confirmation).\n"), diff --git a/src/main.rs b/src/main.rs index c328f6f0..90454c1c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -253,10 +253,10 @@ fn main() -> error::Result<()> { match event.code { KeyCode::Char('c') => break, KeyCode::Char('f') => app.enable_searching(), - KeyCode::Left | KeyCode::Char('h') => app.move_left(), - KeyCode::Right | KeyCode::Char('l') => app.move_right(), - KeyCode::Up | KeyCode::Char('k') => app.move_up(), - KeyCode::Down | KeyCode::Char('j') => app.move_down(), + KeyCode::Left => app.move_left(), + KeyCode::Right => app.move_right(), + KeyCode::Up => app.move_up(), + KeyCode::Down => app.move_down(), KeyCode::Char('p') => app.search_with_pid(), KeyCode::Char('n') => app.search_with_name(), KeyCode::Char('r') => { @@ -264,11 +264,18 @@ fn main() -> error::Result<()> { app.reset(); } } - // TODO: [SEARCH] Rename "simple" search to just... search without cases... KeyCode::Char('a') => app.skip_cursor_beginning(), KeyCode::Char('e') => app.skip_cursor_end(), _ => {} } + } else if let KeyModifiers::SHIFT = event.modifiers { + match event.code { + KeyCode::Left => app.move_left(), + KeyCode::Right => app.move_right(), + KeyCode::Up => app.move_up(), + KeyCode::Down => app.move_down(), + _ => {} + } } } |