summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2024-01-09 20:53:16 -0500
committerJoseph Donofry <joedonofry@gmail.com>2024-01-09 20:53:22 -0500
commit373fb49903f8eb49d24a70c67693295235e9219d (patch)
tree823f1af8af6c946dcd705258f6d343c175f67eea
parentUse macos define everywhere (diff)
downloadnheko-373fb49903f8eb49d24a70c67693295235e9219d.tar.xz
Fix some keyboard shortcuts on macOS that involved arrow keys
-rw-r--r--resources/qml/MessageInput.qml4
-rw-r--r--resources/qml/MessageView.qml6
-rw-r--r--resources/qml/Root.qml4
-rw-r--r--resources/qml/TimelineView.qml2
-rw-r--r--resources/qml/dialogs/InputDialog.qml2
5 files changed, 9 insertions, 9 deletions
diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml
index 37793751..ffe80a2e 100644
--- a/resources/qml/MessageInput.qml
+++ b/resources/qml/MessageInput.qml
@@ -224,7 +224,7 @@ Rectangle {
                     } else if ((event.key == Qt.Key_Down || event.key == Qt.Key_Backtab) && popup.opened) {
                         event.accepted = true;
                         completer.down();
-                    } else if (event.key == Qt.Key_Up && event.modifiers == Qt.NoModifier) {
+                    } else if (event.key == Qt.Key_Up && (event.modifiers == Qt.NoModifier || event.modifiers == Qt.KeypadModifier)) {
                         if (cursorPosition == 0) {
                             event.accepted = true;
                             var idx = room.edit ? room.idToIndex(room.edit) + 1 : 0;
@@ -242,7 +242,7 @@ Rectangle {
                             event.accepted = true;
                             positionCursorAtStart();
                         }
-                    } else if (event.key == Qt.Key_Down && event.modifiers == Qt.NoModifier) {
+                    } else if (event.key == Qt.Key_Down && (event.modifiers == Qt.NoModifier || event.modifiers == Qt.KeypadModifier)) {
                         if (cursorPosition == messageInput.length && room.edit) {
                             event.accepted = true;
                             var idx = room.idToIndex(room.edit) - 1;
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml
index 97a121eb..c2dd8308 100644
--- a/resources/qml/MessageView.qml
+++ b/resources/qml/MessageView.qml
@@ -283,7 +283,7 @@ Item {
             }
         }
         Shortcut {
-            sequence: StandardKey.MoveToPreviousPage
+            sequences: [StandardKey.MoveToPreviousPage]
 
             onActivated: {
                 chat.contentY = chat.contentY - chat.height * 0.9;
@@ -291,7 +291,7 @@ Item {
             }
         }
         Shortcut {
-            sequence: StandardKey.MoveToNextPage
+            sequences: [StandardKey.MoveToNextPage]
 
             onActivated: {
                 chat.contentY = chat.contentY + chat.height * 0.9;
@@ -299,7 +299,7 @@ Item {
             }
         }
         Shortcut {
-            sequence: StandardKey.Cancel
+            sequences: [StandardKey.Cancel]
 
             onActivated: {
                 if (room.input.uploads.length > 0)
diff --git a/resources/qml/Root.qml b/resources/qml/Root.qml
index 4acf3e73..8145e5e5 100644
--- a/resources/qml/Root.qml
+++ b/resources/qml/Root.qml
@@ -127,12 +127,12 @@ Pane {
         onActivated: Rooms.nextRoomWithActivity()
     }
     Shortcut {
-        sequence: "Ctrl+Down"
+        sequences: ["Ctrl+Down", "Ctrl+PgDown"]
 
         onActivated: Rooms.nextRoom()
     }
     Shortcut {
-        sequence: "Ctrl+Up"
+        sequences: ["Ctrl+Up", "Ctrl+PgUp"]
 
         onActivated: Rooms.previousRoom()
     }
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 0a255491..6786b26b 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -39,7 +39,7 @@ Item {
         emoji: true
     }
     Shortcut {
-        sequence: StandardKey.Close
+        sequences: [StandardKey.Close]
 
         onActivated: Rooms.resetCurrentRoom()
     }
diff --git a/resources/qml/dialogs/InputDialog.qml b/resources/qml/dialogs/InputDialog.qml
index 8bd95d09..bf3cbc9a 100644
--- a/resources/qml/dialogs/InputDialog.qml
+++ b/resources/qml/dialogs/InputDialog.qml
@@ -25,7 +25,7 @@ ApplicationWindow {
     }
 
     Shortcut {
-        sequence: StandardKey.Cancel
+        sequences: [StandardKey.Cancel]
         onActivated: dbb.rejected()
     }