mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-23 13:45:12 +02:00
change: Add WASD keys for widget selection movement
This commit is contained in:
parent
de8460cf9c
commit
60f4759494
@ -15,8 +15,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Changes
|
||||
|
||||
- Added `WASD` as an alternative widget movement system.
|
||||
|
||||
- Changed to just support stable (and newer) Rust, due to library incompatibilities.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
## [0.4.5] - 2020-07-08
|
||||
|
||||
- No changes here, just an uptick for Crates.io using the wrong Cargo.lock.
|
||||
|
41
README.md
41
README.md
@ -181,25 +181,28 @@ Run using `btm`.
|
||||
|
||||
#### General
|
||||
|
||||
| | |
|
||||
| -------------------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `q`, `Ctrl-c` | Quit |
|
||||
| `Esc` | Close dialog windows, search, widgets, or exit expanded mode |
|
||||
| `Ctrl-r` | Reset display and any collected data |
|
||||
| `f` | Freeze/unfreeze updating with new data |
|
||||
| `Ctrl`-arrow key<br>`Shift`-arrow key<br>`H/J/K/L` | Move to a different widget (on macOS some keybindings may conflict) |
|
||||
| `Left`, `h` | Move left within widget |
|
||||
| `Down`, `j` | Move down within widget |
|
||||
| `Up`,`k` | Move up within widget |
|
||||
| `Right`, `l` | Move right within widget |
|
||||
| `?` | Open help menu |
|
||||
| `gg`, `Home` | Jump to the first entry |
|
||||
| `Shift-g`, `End` | Jump to the last entry |
|
||||
| `e` | Expand the currently selected widget |
|
||||
| `+` | Zoom in on chart (decrease time range) |
|
||||
| `-` | Zoom out on chart (increase time range) |
|
||||
| `=` | Reset zoom |
|
||||
| Mouse scroll | Table: Scroll<br>Chart: Zooms in or out by scrolling up or down respectively |
|
||||
| | |
|
||||
| ------------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `q`, `Ctrl-c` | Quit |
|
||||
| `Esc` | Close dialog windows, search, widgets, or exit expanded mode |
|
||||
| `Ctrl-r` | Reset display and any collected data |
|
||||
| `f` | Freeze/unfreeze updating with new data |
|
||||
| `Ctrl-Left`<br>`Shift-Left`<br>`H`<br>`A` | Move widget selection left |
|
||||
| `Ctrl-Right`<br>`Shift-Right`<br>`L`<br>`D` | Move widget selection right |
|
||||
| `Ctrl-Up`<br>`Shift-Up`<br>`K`<br>`W` | Move widget selection up |
|
||||
| `Ctrl-Down`<br>`Shift-Down`<br>`J`<br>`S` | Move widget selection down |
|
||||
| `Left`, `h` | Move left within widget |
|
||||
| `Down`, `j` | Move down within widget |
|
||||
| `Up`,`k` | Move up within widget |
|
||||
| `Right`, `l` | Move right within widget |
|
||||
| `?` | Open help menu |
|
||||
| `gg`, `Home` | Jump to the first entry |
|
||||
| `Shift-g`, `End` | Jump to the last entry |
|
||||
| `e` | Expand the currently selected widget |
|
||||
| `+` | Zoom in on chart (decrease time range) |
|
||||
| `-` | Zoom out on chart (increase time range) |
|
||||
| `=` | Reset zoom |
|
||||
| Mouse scroll | Table: Scroll<br>Chart: Zooms in or out by scrolling up or down respectively |
|
||||
|
||||
#### CPU bindings
|
||||
|
||||
|
@ -1001,10 +1001,10 @@ impl App {
|
||||
self.help_dialog_state.is_showing_help = true;
|
||||
self.is_force_redraw = true;
|
||||
}
|
||||
'H' => self.move_widget_selection_left(),
|
||||
'L' => self.move_widget_selection_right(),
|
||||
'K' => self.move_widget_selection_up(),
|
||||
'J' => self.move_widget_selection_down(),
|
||||
'H' | 'A' => self.move_widget_selection_left(),
|
||||
'L' | 'D' => self.move_widget_selection_right(),
|
||||
'K' | 'W' => self.move_widget_selection_up(),
|
||||
'J' | 'S' => self.move_widget_selection_down(),
|
||||
' ' => self.on_space(),
|
||||
'+' => self.zoom_in(),
|
||||
'-' => self.zoom_out(),
|
||||
|
@ -51,15 +51,24 @@ pub const HELP_CONTENTS_TEXT: [&str; 6] = [
|
||||
"5 - Battery widget",
|
||||
];
|
||||
|
||||
pub const GENERAL_HELP_TEXT: [&str; 20] = [
|
||||
pub const GENERAL_HELP_TEXT: [&str; 29] = [
|
||||
"1 - General\n",
|
||||
"q, Ctrl-c Quit\n",
|
||||
"Esc Close dialog windows, search, widgets, or exit expanded mode\n",
|
||||
"Ctrl-r Reset display and any collected data\n",
|
||||
"f Freeze/unfreeze updating with new data\n",
|
||||
"Ctrl-Arrow \n",
|
||||
"Shift-Arrow Move to a different widget\n",
|
||||
"H/J/K/L \n",
|
||||
"Ctrl-Left, \n",
|
||||
"Shift-Left, Move widget selection left\n",
|
||||
"H, A \n",
|
||||
"Ctrl-Right, \n",
|
||||
"Shift-Right, Move widget selection right\n",
|
||||
"L, D \n",
|
||||
"Ctrl-Up, \n",
|
||||
"Shift-Up, Move widget selection up\n",
|
||||
"K, W \n",
|
||||
"Ctrl-Down, \n",
|
||||
"Shift-Down, Move widget selection down\n",
|
||||
"J, S \n",
|
||||
"Left, h Move left within widget\n",
|
||||
"Down, j Move down within widget\n",
|
||||
"Up, k Move up within widget\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user