From 2a42e7a0125f33dea661659dcb34e9f6d6a61b65 Mon Sep 17 00:00:00 2001 From: Benjamin Jillich <43751992+amzn-jillich@users.noreply.github.com> Date: Fri, 2 Jul 2021 08:56:34 -0700 Subject: [PATCH] [LYN-4393] As a dev I want to Enable Gems in O3DE.exe with Keyboard (#1760) Enabling and disabling the selected gem is now possible by pressing the space bar. Signed-off-by: Benjamin Jillich --- .../Source/GemCatalog/GemItemDelegate.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp index 2718165993..035fcb7181 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp @@ -131,6 +131,17 @@ namespace O3DE::ProjectManager return false; } + if (event->type() == QEvent::KeyPress) + { + auto keyEvent = static_cast(event); + if (keyEvent->key() == Qt::Key_Space) + { + const bool isAdded = GemModel::IsAdded(modelIndex); + GemModel::SetIsAdded(*model, modelIndex, !isAdded); + return true; + } + } + if (event->type() == QEvent::MouseButtonPress) { QMouseEvent* mouseEvent = static_cast(event);