From 1d5536401d70ced3cc9c6cf45fca69d95184db07 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 27 Oct 2025 16:24:20 -0400 Subject: [PATCH] Make the CTRL+F shortcut search the current room's messages Right now there's not an easy way to quickly bring up message search. If you press CTRL+F (with the room information sidebar *closed*, for some reason) that brings up the same dialog as CTRL+K which seems redundant. I assigned that shortcut to the message search dialog instead, which is makes much more sense in my opinion. I also made sure its disabled in spaces or when there's not a room open. BUG: 487270 FIXED-IN: 25.12.0 --- src/app/qml/RoomPage.qml | 12 ++++++++++++ src/rooms/ExploreComponent.qml | 4 ---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/app/qml/RoomPage.qml b/src/app/qml/RoomPage.qml index a2231430c..2f585ee44 100644 --- a/src/app/qml/RoomPage.qml +++ b/src/app/qml/RoomPage.qml @@ -119,6 +119,18 @@ Kirigami.Page { } ] + Kirigami.Action { + enabled: root.currentRoom && !root.currentRoom.isSpace + shortcut: "Ctrl+F" + onTriggered: { + ((root.QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RoomSearchPage'), { + room: root.currentRoom + }, { + title: i18nc("@action:title", "Search") + }); + } + } + KeyNavigation.left: (root.Kirigami.PageStack.pageStack as Kirigami.PageRow).get(0) onCurrentRoomChanged: { diff --git a/src/rooms/ExploreComponent.qml b/src/rooms/ExploreComponent.qml index db6a62736..1871971b6 100644 --- a/src/rooms/ExploreComponent.qml +++ b/src/rooms/ExploreComponent.qml @@ -46,10 +46,6 @@ RowLayout { onClicked: root.search(); icon.name: "search" text: i18nc("@action", "Search Rooms") - Shortcut { - sequence: "Ctrl+F" - onActivated: searchButton.clicked() - } QQC2.ToolTip.visible: hovered QQC2.ToolTip.text: text