From 6f0d0a22366b9bd007c8d8f1d71f5bddc3e9a98b Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Wed, 28 Aug 2019 08:42:49 +0200 Subject: [PATCH] Replicate Shift+Enter for action invocation for history as well This was missing from the ResultsList, just copied it over. BUG: 411350 FIXED-IN: 5.16.5 Differential Revision: https://phabricator.kde.org/D23494 --- lookandfeel/contents/runcommand/RunCommand.qml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lookandfeel/contents/runcommand/RunCommand.qml b/lookandfeel/contents/runcommand/RunCommand.qml index 95317b646..8c5c165b2 100644 --- a/lookandfeel/contents/runcommand/RunCommand.qml +++ b/lookandfeel/contents/runcommand/RunCommand.qml @@ -244,8 +244,8 @@ ColumnLayout { currentIndex = 0; } } - Keys.onReturnPressed: runCurrentIndex() - Keys.onEnterPressed: runCurrentIndex() + Keys.onReturnPressed: runCurrentIndex(event) + Keys.onEnterPressed: runCurrentIndex(event) Keys.onTabPressed: { if (currentIndex == listView.count-1) { @@ -276,9 +276,16 @@ ColumnLayout { Keys.onUpPressed: decrementCurrentIndex() Keys.onDownPressed: incrementCurrentIndex() - function runCurrentIndex() { + function runCurrentIndex(event) { var entry = runnerWindow.history[currentIndex] if (entry) { + // If user presses Shift+Return to invoke an action, invoke the first runner action + if (event && event.modifiers === Qt.ShiftModifier + && currentItem.additionalActions && currentItem.additionalActions.length > 0) { + runAction(0); + return + } + queryField.text = entry queryField.forceActiveFocus(); }