mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Fix some keyboard shortcuts on macOS that involved arrow keys
This commit is contained in:
parent
eaea788a7f
commit
373fb49903
5 changed files with 9 additions and 9 deletions
|
@ -224,7 +224,7 @@ Rectangle {
|
||||||
} else if ((event.key == Qt.Key_Down || event.key == Qt.Key_Backtab) && popup.opened) {
|
} else if ((event.key == Qt.Key_Down || event.key == Qt.Key_Backtab) && popup.opened) {
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
completer.down();
|
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) {
|
if (cursorPosition == 0) {
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
var idx = room.edit ? room.idToIndex(room.edit) + 1 : 0;
|
var idx = room.edit ? room.idToIndex(room.edit) + 1 : 0;
|
||||||
|
@ -242,7 +242,7 @@ Rectangle {
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
positionCursorAtStart();
|
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) {
|
if (cursorPosition == messageInput.length && room.edit) {
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
var idx = room.idToIndex(room.edit) - 1;
|
var idx = room.idToIndex(room.edit) - 1;
|
||||||
|
|
|
@ -283,7 +283,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: StandardKey.MoveToPreviousPage
|
sequences: [StandardKey.MoveToPreviousPage]
|
||||||
|
|
||||||
onActivated: {
|
onActivated: {
|
||||||
chat.contentY = chat.contentY - chat.height * 0.9;
|
chat.contentY = chat.contentY - chat.height * 0.9;
|
||||||
|
@ -291,7 +291,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: StandardKey.MoveToNextPage
|
sequences: [StandardKey.MoveToNextPage]
|
||||||
|
|
||||||
onActivated: {
|
onActivated: {
|
||||||
chat.contentY = chat.contentY + chat.height * 0.9;
|
chat.contentY = chat.contentY + chat.height * 0.9;
|
||||||
|
@ -299,7 +299,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: StandardKey.Cancel
|
sequences: [StandardKey.Cancel]
|
||||||
|
|
||||||
onActivated: {
|
onActivated: {
|
||||||
if (room.input.uploads.length > 0)
|
if (room.input.uploads.length > 0)
|
||||||
|
|
|
@ -127,12 +127,12 @@ Pane {
|
||||||
onActivated: Rooms.nextRoomWithActivity()
|
onActivated: Rooms.nextRoomWithActivity()
|
||||||
}
|
}
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: "Ctrl+Down"
|
sequences: ["Ctrl+Down", "Ctrl+PgDown"]
|
||||||
|
|
||||||
onActivated: Rooms.nextRoom()
|
onActivated: Rooms.nextRoom()
|
||||||
}
|
}
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: "Ctrl+Up"
|
sequences: ["Ctrl+Up", "Ctrl+PgUp"]
|
||||||
|
|
||||||
onActivated: Rooms.previousRoom()
|
onActivated: Rooms.previousRoom()
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ Item {
|
||||||
emoji: true
|
emoji: true
|
||||||
}
|
}
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: StandardKey.Close
|
sequences: [StandardKey.Close]
|
||||||
|
|
||||||
onActivated: Rooms.resetCurrentRoom()
|
onActivated: Rooms.resetCurrentRoom()
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: StandardKey.Cancel
|
sequences: [StandardKey.Cancel]
|
||||||
onActivated: dbb.rejected()
|
onActivated: dbb.rejected()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue