Repository: tarkah/tickrs (language: rust)

Issue:
shift+tab not working
After the latest dependency update #68, <kbd>shift</kbd>+<kbd>tab</kbd> no longer works.

With the `SHOW_DEBUG=1` env

`v0.11.0`
``` rust
DebugInfo { ..., last_event: Some(Key(KeyEvent { code: BackTab, modifiers: NONE })), mode: DisplayStock }
```

[`#68`](https://github.com/tarkah/tickrs/pull/68)
``` rust
DebugInfo { ..., last_event: Some(Key(KeyEvent { code: BackTab, modifiers: SHIFT })), mode: DisplayStock }
```

This was changed in `crossterm` [#490](https://github.com/crossterm-rs/crossterm/pull/490) and merged into master at https://github.com/crossterm-rs/crossterm/blob/423895e9523e8cfbd01c46f222c711c3a83bd784/src/event/sys/unix/parse.rs#L140


Discussion / hints:

Fix patch:
diff --git a/src/event.rs b/src/event.rs
index c661d82..54c953a 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -87,14 +87,6 @@ pub fn handle_keys_display_stock(
                 }
                 let _ = request_redraw.try_send(());
             }
-            KeyCode::BackTab => {
-                if app.current_tab == 0 {
-                    app.current_tab = app.stocks.len() - 1;
-                } else {
-                    app.current_tab -= 1;
-                }
-                let _ = request_redraw.try_send(());
-            }
             _ => {}
         }
     } else if key_event.modifiers == KeyModifiers::CONTROL {
@@ -122,10 +114,21 @@ pub fn handle_keys_display_stock(
             _ => {}
         }
     } else if key_event.modifiers == KeyModifiers::SHIFT {
-        if let KeyCode::Char('?') = key_event.code {
-            app.previous_mode = app.mode;
-            app.mode = app::Mode::Help;
-            let _ = request_redraw.try_send(());
+        match key_event.code {
+            KeyCode::Char('?') => {
+                app.previous_mode = app.mode;
+                app.mode = app::Mode::Help;
+                let _ = request_redraw.try_send(());
+            }
+            KeyCode::BackTab => {
+                if app.current_tab == 0 {
+                    app.current_tab = app.stocks.len() - 1;
+                } else {
+                    app.current_tab -= 1;
+                }
+                let _ = request_redraw.try_send(());
+            }
+            _ => {}
         }
     }
 }


Test patch: