aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/assistant/Card.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/assistant/Card.qml')
-rw-r--r--desktop/assistant/Card.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/desktop/assistant/Card.qml b/desktop/assistant/Card.qml
index 85066fe..a2f8e28 100644
--- a/desktop/assistant/Card.qml
+++ b/desktop/assistant/Card.qml
@@ -49,6 +49,16 @@ Rectangle {
// Keys reach a focused item, never the window (AGENTS.md); the card is
// the ancestor of every text field, so their Escape bubbles here.
Keys.onEscapePressed: card.canvas.back()
+ // Ctrl+N and Ctrl+H do what the New and History buttons do.
+ Keys.onPressed: event => {
+ if (!(event.modifiers & Qt.ControlModifier)) return;
+ if (event.key === Qt.Key_N && card.canvas.connected) {
+ card.canvas.fresh(); card.canvas.historyOpen = false; input.forceActiveFocus();
+ } else if (event.key === Qt.Key_H) {
+ card.canvas.historyOpen ? card.canvas.back() : card.canvas.showHistory();
+ } else return;
+ event.accepted = true;
+ }
// Clicks on the card must not reach the close-on-click catcher behind it.
MouseArea { anchors.fill: parent }