diff --git a/src/settings/CMakeLists.txt b/src/settings/CMakeLists.txt index 0cf082c7c..21010a692 100644 --- a/src/settings/CMakeLists.txt +++ b/src/settings/CMakeLists.txt @@ -50,6 +50,7 @@ ecm_add_qml_module(Settings GENERATE_PLUGIN_SOURCE RoomSortParameterDialog.qml RoomProfile.qml RoomAdvancedPage.qml + KeyboardShortcutsPage.qml SOURCES colorschemer.cpp threepidaddhelper.cpp diff --git a/src/settings/KeyboardShortcutsPage.qml b/src/settings/KeyboardShortcutsPage.qml new file mode 100644 index 000000000..6b8da2ed4 --- /dev/null +++ b/src/settings/KeyboardShortcutsPage.qml @@ -0,0 +1,52 @@ +// SPDX-FileCopyrightText: 2025 Joshua Goins +// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL + +import QtQuick +import QtQuick.Controls as QQC2 +import QtQuick.Layouts + +import org.kde.kirigami as Kirigami +import org.kde.kirigamiaddons.formcard as FormCard + +FormCard.FormCardPage { + title: i18nc("@title:window", "Keyboard Shortcuts") + + FormCard.FormCard { + Layout.topMargin: Kirigami.Units.largeSpacing * 4 + + FormCard.FormTextDelegate { + text: i18nc("@info:label", "Open Quick Switcher") + description: "Ctrl+K" + } + + FormCard.FormTextDelegate { + text: i18nc("@info:label", "Open Account Switcher") + description: "Ctrl+U" + } + + FormCard.FormTextDelegate { + text: i18nc("@info:label", "Search Messages in Current Room") + description: "Ctrl+F" + } + + FormCard.FormTextDelegate { + text: i18nc("@info:label", "Go to Previous Room") + description: "Ctrl+PgUp, Ctrl+Backtab, Alt+Up" + } + + FormCard.FormTextDelegate { + text: i18nc("@info:label", "Go to Next Room") + description: "Ctrl+PgDown, Ctrl+Tab, Alt+Down" + } + + FormCard.FormTextDelegate { + text: i18nc("@info:label", "Go to Previous Unread Room") + description: "Alt+Shift+Up" + } + + FormCard.FormTextDelegate { + text: i18nc("@info:label", "Go to Next Unread Room") + description: "Alt+Shift+Down" + } + } +} diff --git a/src/settings/NeoChatSettingsView.qml b/src/settings/NeoChatSettingsView.qml index 645b56105..635c69db5 100644 --- a/src/settings/NeoChatSettingsView.qml +++ b/src/settings/NeoChatSettingsView.qml @@ -97,6 +97,12 @@ KirigamiSettings.ConfigurationView { } visible: root.connection !== null }, + KirigamiSettings.ConfigurationModule { + moduleId: "keyboardShortcuts" + text: i18n("Keyboard Shortcuts") + icon.name: "input-keyboard-symbolic" + page: () => Qt.createComponent("org.kde.neochat.settings", "KeyboardShortcutsPage") + }, KirigamiSettings.ConfigurationModule { moduleId: "aboutNeochat" text: i18n("About NeoChat")