diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-04-04 13:11:22 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-04-04 13:11:22 +0200 |
commit | ab3d462590e29488e2f5cff8338745347ff80742 (patch) | |
tree | 34c0f26ca61e88709106851a89f312277a5f9e27 /framework/qml/ConversationView.qml | |
parent | 974b53f9df94d70a7f04080e181704111c2f294a (diff) | |
download | kube-ab3d462590e29488e2f5cff8338745347ff80742.tar.gz kube-ab3d462590e29488e2f5cff8338745347ff80742.zip |
Keyboard navigation in conversation view.
One problem with the current setting is that j/k is used for scrolling
in the conversation view, but for moving to the next mail in the
maillist view. To normalize this we could be using j/k for moving to the
next conversation instead, and n/p to go to the next/previous mail,
which is also what gmail does.
Diffstat (limited to 'framework/qml/ConversationView.qml')
-rw-r--r-- | framework/qml/ConversationView.qml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/framework/qml/ConversationView.qml b/framework/qml/ConversationView.qml index 4aa2b2c0..8331e581 100644 --- a/framework/qml/ConversationView.qml +++ b/framework/qml/ConversationView.qml | |||
@@ -62,9 +62,17 @@ FocusScope { | |||
62 | 62 | ||
63 | Keys.onPressed: { | 63 | Keys.onPressed: { |
64 | if (event.text == "j" || event.matches(StandardKey.MoveToNextLine)) { | 64 | if (event.text == "j" || event.matches(StandardKey.MoveToNextLine)) { |
65 | listView.scrollDown() | ||
66 | } else if (event.text == "J" || event.matches(StandardKey.MoveToNextPage)) { | ||
65 | listView.incrementCurrentIndex() | 67 | listView.incrementCurrentIndex() |
66 | } else if (event.text == "k" || event.matches(StandardKey.MoveToPreviousLine)) { | 68 | } else if (event.text == "k" || event.matches(StandardKey.MoveToPreviousLine)) { |
69 | listView.scrollUp() | ||
70 | } else if (event.text == "K" || event.matches(StandardKey.MoveToPreviousPage)) { | ||
67 | listView.decrementCurrentIndex() | 71 | listView.decrementCurrentIndex() |
72 | } else if (event.text == "n") { | ||
73 | Kube.Fabric.postMessage(Kube.Messages.nextConversation, {}) | ||
74 | } else if (event.text == "p") { | ||
75 | Kube.Fabric.postMessage(Kube.Messages.previousConversation, {}) | ||
68 | } else if (event.text == "d") { | 76 | } else if (event.text == "d") { |
69 | //Not implemented as a shortcut because we want it only to apply if we have the focus | 77 | //Not implemented as a shortcut because we want it only to apply if we have the focus |
70 | Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail": listView.currentItem.currentData.mail}) | 78 | Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail": listView.currentItem.currentData.mail}) |