From 88c010a415ca2bd63eda3b7588cc3edbc01bbdb7 Mon Sep 17 00:00:00 2001 From: Stanimal Date: Tue, 25 Jan 2022 18:34:21 +0400 Subject: [PATCH] feat(console-wallet): shift+tab to go to prev tab --- applications/tari_console_wallet/src/ui/app.rs | 4 ++++ applications/tari_console_wallet/src/ui/mod.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/applications/tari_console_wallet/src/ui/app.rs b/applications/tari_console_wallet/src/ui/app.rs index 4d1834d646..145ce992e4 100644 --- a/applications/tari_console_wallet/src/ui/app.rs +++ b/applications/tari_console_wallet/src/ui/app.rs @@ -130,6 +130,10 @@ impl App { } } + pub fn on_backtab(&mut self) { + self.tabs.previous(); + } + pub fn on_up(&mut self) { self.tabs.on_up(&mut self.app_state); } diff --git a/applications/tari_console_wallet/src/ui/mod.rs b/applications/tari_console_wallet/src/ui/mod.rs index ae417e28fa..bdb00f239d 100644 --- a/applications/tari_console_wallet/src/ui/mod.rs +++ b/applications/tari_console_wallet/src/ui/mod.rs @@ -122,6 +122,7 @@ fn crossterm_loop(mut app: App>) -> 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(), _ => {}, },