mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Fix Ctrl-Enter shortcut
This commit is contained in:
parent
f30c3db860
commit
155315ecbb
1 changed files with 11 additions and 9 deletions
|
@ -29,11 +29,9 @@ ApplicationWindow {
|
||||||
height: 380
|
height: 380
|
||||||
width: 340
|
width: 340
|
||||||
|
|
||||||
// TODO: make this work in the TextField
|
Keys.onShortcutOverride: event.accepted = ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && event.modifiers & Qt.ControlModifier)
|
||||||
Shortcut {
|
Keys.onEnterPressed: if (event.modifiers & Qt.ControlModifier) invitees.accept()
|
||||||
sequence: "Ctrl+Enter"
|
Keys.onReturnPressed: if (event.modifiers & Qt.ControlModifier) invitees.accept()
|
||||||
onActivated: invitees.accept()
|
|
||||||
}
|
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: StandardKey.Cancel
|
sequence: StandardKey.Cancel
|
||||||
|
@ -66,10 +64,14 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
Component.onCompleted: forceActiveFocus()
|
Component.onCompleted: forceActiveFocus()
|
||||||
|
|
||||||
Shortcut {
|
// Shortcut {
|
||||||
sequence: "Ctrl+Enter"
|
// sequence: "Ctrl+Enter"
|
||||||
onActivated: invitees.accept()
|
// onActivated: invitees.accept()
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
Keys.onShortcutOverride: event.accepted = ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && event.modifiers & Qt.ControlModifier)
|
||||||
|
Keys.onEnterPressed: if (event.modifiers & Qt.ControlModifier) invitees.accept()
|
||||||
|
Keys.onReturnPressed: if (event.modifiers & Qt.ControlModifier) invitees.accept()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue