allow audio engine to react to keyboard inputs
This commit is contained in:
19
ui/Main.qml
19
ui/Main.qml
@@ -30,4 +30,23 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
focus: true
|
||||
|
||||
Keys.onPressed: (event) => {
|
||||
if(!event.isAutoRepeat) {
|
||||
keyboardController.keyDownEvent(event.key, event.modifiers, event.text)
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
Keys.onReleased: (event) => {
|
||||
if(!event.isAutoRepeat) {
|
||||
keyboardController.keyUpEvent(event.key, event.modifiers, event.text)
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user