diff --git a/CHANGELOG.md b/CHANGELOG.md index 386738a8..b326bef7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/README.md b/README.md index 7e86117e..cd827087 100644 --- a/README.md +++ b/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
`Shift`-arrow key
`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
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`
`Shift-Left`
`H`
`A` | Move widget selection left | +| `Ctrl-Right`
`Shift-Right`
`L`
`D` | Move widget selection right | +| `Ctrl-Up`
`Shift-Up`
`K`
`W` | Move widget selection up | +| `Ctrl-Down`
`Shift-Down`
`J`
`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
Chart: Zooms in or out by scrolling up or down respectively | #### CPU bindings diff --git a/src/app.rs b/src/app.rs index 9c206a03..0d7a40aa 100644 --- a/src/app.rs +++ b/src/app.rs @@ -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(), diff --git a/src/constants.rs b/src/constants.rs index e72eb82a..26f97381 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -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",