From e48dfd15fe9ae1ca0dd27fd3fb69e5acaf564833 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 6 May 2020 13:33:13 +0200 Subject: [PATCH] Add shortcuts to select/deselect reply targets --- resources/qml/TimelineView.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index a63ca04..eca646d 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -134,6 +134,21 @@ Page { sequence: StandardKey.MoveToNextPage onActivated: { chat.contentY = chat.contentY + chat.height / 2; chat.returnToBounds(); } } + Shortcut { + sequence: StandardKey.Cancel + onActivated: chat.model.reply = undefined + } + Shortcut { + sequence: "Alt+Up" + onActivated: chat.model.reply = chat.model.indexToId(chat.model.reply? chat.model.idToIndex(chat.model.reply) + 1 : 0) + } + Shortcut { + sequence: "Alt+Down" + onActivated: { + var idx = chat.model.reply? chat.model.idToIndex(chat.model.reply) - 1 : -1 + chat.model.reply = idx >= 0 ? chat.model.indexToId(idx) : undefined + } + } ScrollBar.vertical: ScrollBar { id: scrollbar