Skip to content

Commit bbcac60

Browse files
committed
feat(console-wallet): shift+tab to go to prev tab
1 parent 8efd2e4 commit bbcac60

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

applications/tari_console_wallet/src/ui/app.rs

+4
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ impl<B: Backend> App<B> {
130130
}
131131
}
132132

133+
pub fn on_backtab(&mut self) {
134+
self.tabs.previous();
135+
}
136+
133137
pub fn on_up(&mut self) {
134138
self.tabs.on_up(&mut self.app_state);
135139
}

applications/tari_console_wallet/src/ui/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ fn crossterm_loop(mut app: App<CrosstermBackend<Stdout>>) -> Result<(), ExitCode
113113
})? {
114114
Event::Input(event) => match (event.code, event.modifiers) {
115115
(KeyCode::Char(c), KeyModifiers::CONTROL) => app.on_control_key(c),
116-
(KeyCode::Char(c), _) => app.on_key(c),
117116
(KeyCode::Left, _) => app.on_left(),
118117
(KeyCode::Up, _) => app.on_up(),
119118
(KeyCode::Right, _) => app.on_right(),
@@ -122,6 +121,7 @@ fn crossterm_loop(mut app: App<CrosstermBackend<Stdout>>) -> Result<(), ExitCode
122121
(KeyCode::Backspace, _) => app.on_backspace(),
123122
(KeyCode::Enter, _) => app.on_key('\n'),
124123
(KeyCode::Tab, _) => app.on_key('\t'),
124+
(KeyCode::BackTab, _) => app.on_backtab(),
125125
(KeyCode::F(10), _) => app.on_f10(),
126126
_ => {},
127127
},

0 commit comments

Comments
 (0)