Add informational Keyboard Shortcuts settings page

While we don't have customizable keyboard shortcuts (yet!) we have been
asked before for some way to view all of NeoChat's keyboard shortcuts.
This commit is contained in:
Joshua Goins
2025-10-27 16:52:30 -04:00
parent 1f1db11197
commit 069e0d8f16
3 changed files with 59 additions and 0 deletions

View File

@@ -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

View File

@@ -0,0 +1,52 @@
// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com>
// 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"
}
}
}

View File

@@ -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")