diff --git a/src/qml/Base/HScrollableTextArea.qml b/src/qml/Base/HScrollableTextArea.qml index 47ed1bf7..a026264a 100644 --- a/src/qml/Base/HScrollableTextArea.qml +++ b/src/qml/Base/HScrollableTextArea.qml @@ -27,6 +27,11 @@ ScrollView { color: theme.controls.textArea.background } + Keys.onPressed: if ( + event.modifiers & Qt.AltModifier || + event.modifiers & Qt.MetaModifier + ) event.accepted = true + Keys.forwardTo: mainUI.shortcuts } } diff --git a/src/qml/Base/HTextField.qml b/src/qml/Base/HTextField.qml index dddeab10..7c4dfed9 100644 --- a/src/qml/Base/HTextField.qml +++ b/src/qml/Base/HTextField.qml @@ -28,5 +28,11 @@ TextField { } selectByMouse: true + + Keys.onPressed: if ( + event.modifiers & Qt.AltModifier || + event.modifiers & Qt.MetaModifier + ) event.accepted = true + Keys.forwardTo: mainUI.shortcuts } diff --git a/src/qml/Chat/SendBox.qml b/src/qml/Chat/SendBox.qml index f65957cc..1df37af7 100644 --- a/src/qml/Chat/SendBox.qml +++ b/src/qml/Chat/SendBox.qml @@ -169,13 +169,6 @@ HRectangle { }) area.Keys.onPressed.connect(event => { - if (event.modifiers == Qt.MetaModifier) { - // Prevent super+key from sending the key as text - // on xwayland - event.accepted = true - return - } - if (event.modifiers == Qt.NoModifier && event.key == Qt.Key_Backspace && ! textArea.selectedText)