From de82b132907110a884239709dea43e08867501d8 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 9 Apr 2018 10:02:43 +0200 Subject: A help view to list shortcuts --- views/conversation/qml/View.qml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/conversation/qml/View.qml b/views/conversation/qml/View.qml index c965b4c7..4cfac3df 100644 --- a/views/conversation/qml/View.qml +++ b/views/conversation/qml/View.qml @@ -20,12 +20,13 @@ import QtQuick 2.9 import QtQuick.Controls 1.3 as Controls1 -import QtQuick.Controls 2.0 as Controls2 +import QtQuick.Controls 2 import QtQuick.Layouts 1.1 import org.kube.framework 1.0 as Kube FocusScope { + id: root property alias currentAccount: accountFolderview.currentAccount Shortcut { @@ -56,6 +57,10 @@ FocusScope { sequences: ['c'] onActivated: Kube.Fabric.postMessage(Kube.Messages.compose, {}) } + Shortcut { + sequence: "?" + onActivated: helpViewComponent.createObject(root).open() + } Controls1.SplitView { @@ -179,4 +184,21 @@ FocusScope { } } + + Component { + id: helpViewComponent + Kube.HelpPopup { + ListModel { + ListElement { description: qsTr("Jump to next thread:"); shortcut: "j" } + ListElement { description: qsTr("Jump to previous thread:"); shortcut: "k" } + ListElement { description: qsTr("Jump to next message:"); shortcut: "n" } + ListElement { description: qsTr("Jump to previous message:"); shortcut: "p" } + ListElement { description: qsTr("Jump to next folder:"); shortcut: "f,n" } + ListElement { description: qsTr("Jump to previous previous folder:"); shortcut: "f,p" } + ListElement { description: qsTr("Compose new message:"); shortcut: "c" } + ListElement { description: qsTr("Show this help text:"); shortcut: "?" } + } + } + } + } -- cgit v1.2.3