Skip to content

Commit

Permalink
feat(console-wallet): shift+tab to go to prev tab (#3748)
Browse files Browse the repository at this point in the history
Description
---
- Shift + Tab goes to the previous tab

Motivation and Context
---
If tab goes to next tab, shift + tab should go to previous tab 

How Has This Been Tested?
---
Manually
  • Loading branch information
sdbondi committed Jan 26, 2022
1 parent b58cf4c commit 9725f5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions applications/tari_console_wallet/src/ui/app.rs
Expand Up @@ -130,6 +130,10 @@ impl<B: Backend> App<B> {
}
}

pub fn on_backtab(&mut self) {
self.tabs.previous();
}

pub fn on_up(&mut self) {
self.tabs.on_up(&mut self.app_state);
}
Expand Down
1 change: 1 addition & 0 deletions applications/tari_console_wallet/src/ui/mod.rs
Expand Up @@ -122,6 +122,7 @@ fn crossterm_loop(mut app: App<CrosstermBackend<Stdout>>) -> Result<(), ExitCode
(KeyCode::Backspace, _) => app.on_backspace(),
(KeyCode::Enter, _) => app.on_key('\n'),
(KeyCode::Tab, _) => app.on_key('\t'),
(KeyCode::BackTab, _) => app.on_backtab(),
(KeyCode::F(10), _) => app.on_f10(),
_ => {},
},
Expand Down

0 comments on commit 9725f5f

Please sign in to comment.