summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClementTsang <clementjhtsang@gmail.com>2020-01-04 19:41:32 -0500
committerClementTsang <clementjhtsang@gmail.com>2020-01-04 19:41:32 -0500
commite71e22f726422634c986920021faccb94546b1fc (patch)
treed64ebcc3eb5c50961eabbe786556cfc0de7dfb89 /src
parent4418f956c705848a224db05f7e389d1d2268c3f8 (diff)
[skip travis] Add Home/End keys to navigate tables
Diffstat (limited to 'src')
-rw-r--r--src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index b16250c8..375541cc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -66,7 +66,7 @@ fn main() -> error::Result<()> {
(@arg LEFT_LEGEND: -l --left_legend "Puts external chart legends on the left side rather than the default right side.")
(@arg USE_CURR_USAGE: -u --current_usage "Within Linux, sets a process' CPU usage to be based on the total current CPU usage, rather than assuming 100% usage.")
//(@arg CONFIG_LOCATION: -co --config +takes_value "Sets the location of the config file. Expects a config file in the JSON format.")
- //(@arg BASIC_MODE: -b --basic "Sets bottom to basic mode, not showing graphs and only showing basic tables.")
+ (@arg BASIC_MODE: -b --basic "Sets bottom to basic mode, not showing graphs and only showing basic tables.")
)
.get_matches();
@@ -202,7 +202,8 @@ fn main() -> error::Result<()> {
// If only a code, and no modifiers, don't bother...
match event.code {
KeyCode::Char('q') => break,
- KeyCode::Char('G') => app.skip_to_last(),
+ KeyCode::Char('G') | KeyCode::End => app.skip_to_last(),
+ KeyCode::Home => app.skip_to_first(),
KeyCode::Char('h') => app.on_left(),
KeyCode::Char('l') => app.on_right(),
KeyCode::Char('k') => app.on_up(),
@@ -212,6 +213,7 @@ fn main() -> error::Result<()> {
KeyCode::Char(uncaught_char) => app.on_char_key(uncaught_char),
KeyCode::Esc => app.reset(),
KeyCode::Enter => app.on_enter(),
+ KeyCode::Tab => {}
_ => {}
}
} else {