diff options
| author | Jon Palmisciano <jp@jonpalmisc.com> | 2021-05-26 15:40:32 -0400 |
|---|---|---|
| committer | Jon Palmisciano <jp@jonpalmisc.com> | 2021-06-10 08:22:26 -0400 |
| commit | 7954a49df95eba2ec7efeca3b4493a6c51070236 (patch) | |
| tree | a49d36f99721e6cc4482120aa0fbe35211981e3a | |
| parent | a1ec654a143099eaac8c31cd2048a9c5c66967f3 (diff) | |
CommandPalette: Enable navigation of results with `(SHIFT+)TAB`
| -rw-r--r-- | ui/commandpalette.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/commandpalette.h b/ui/commandpalette.h index 66072c12..eab17f39 100644 --- a/ui/commandpalette.h +++ b/ui/commandpalette.h @@ -91,10 +91,14 @@ class BINARYNINJAUIAPI CommandListFilter: public QLineEdit CommandPalette* m_palette; CommandList* m_list; + //! Focus the next or previous results list item. + bool cycleSelection(bool forward = true); + public: CommandListFilter(CommandPalette* parent, CommandList* list); protected: + bool event(QEvent* event) override; virtual void keyPressEvent(QKeyEvent* event) override; virtual void focusOutEvent(QFocusEvent* event) override; }; @@ -120,7 +124,9 @@ public: CommandPalette(QWidget* parent, UIActionHandler* handler, const UIActionContext& context); void focusInput(); - void activateFirstItem(); + + //! Activate the focused item, or topmost item if there is no selection. + void activateFocusedItem(); void selectFirstItem(); void close(); |
