From 7954a49df95eba2ec7efeca3b4493a6c51070236 Mon Sep 17 00:00:00 2001 From: Jon Palmisciano Date: Wed, 26 May 2021 15:40:32 -0400 Subject: CommandPalette: Enable navigation of results with `(SHIFT+)TAB` --- ui/commandpalette.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(); -- cgit v1.3.1