mirror of
https://github.com/ClementTsang/bottom
synced 2025-02-15 12:48:28 +00:00
Removed Ctrl-hjkl as movement between widgets as Ctrl-j seemed to be broken... replaced with Shift-arrow keys for an alternative
This commit is contained in:
parent
e548d07c1f
commit
e98cc770a5
3 changed files with 14 additions and 7 deletions
|
@ -94,7 +94,7 @@ when searching processes.
|
|||
|
||||
- `f` to freeze the screen from updating with new data. Press `f` again to unfreeze. Note that monitoring will still continue in the background.
|
||||
|
||||
- `Ctrl-Up` or `Ctrl-k`, `Ctrl-Down` or `Ctrl-j`, `Ctrl-Left` or `Ctrl-h`, `Ctrl-Right` or `Ctrl-l` to navigate between widgets.
|
||||
- `Ctrl/Shift-Up`, `Ctrl/Shift-Down`, `Ctrl/Shift-Left`, and `Ctrl/Shift-Right` to navigate between widgets.
|
||||
|
||||
- `Esc` to close a dialog window.
|
||||
|
||||
|
|
|
@ -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"),
|
||||
|
|
17
src/main.rs
17
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(),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue