I have a simple QtQuick application, say
import QtQuick 2.12
import QtQuick.Window 2.12
Window {
visible: true
width: 640
height: 480
Shortcut {
sequence: "i"
context: Qt.ApplicationShortcut
onActivated: {
console.log("activated!")
}
}
}
When I press the "I" key i see "activated!" in the console. But my problem is my app should response to Alt key (without any main key). When I set "sequence" property to "Alt" (or "Ctrl", "Shift", ... any modifier) nothing happens. So is there any way to handle only modifier pressing within the shortcut?
I think I can not use Keys.onPressed because I want to handle Alt key no matter which Item is focused now