Comment 3 for bug 1400285

Revision history for this message
Niklas Wenzel (nikwen) wrote :

Okay, forget about what I wrote. I think I found a way to do that while working on LP: #1401994. :)

One can add the following to the QMLTermWidget to prevent the key from being sent to the terminal widget:

Keys.onPressed: {
    if (event.key === Qt.Key_A && (event.modifiers & Qt.ControlModifier)) {
        event.accepted = true
    }
}

From the documentation:

"Setting accepted to true prevents the key event from being propagated to the item's parent."

Source: http://doc.qt.io/qt-5/qml-qtquick-keyevent.html#accepted-prop

I assigned myself but if anybody is faster than me with implementing this, feel free to assign it to you. I'll first work on the other bug and then come to this.