added ability to use keyboard to navigate through slides

This commit is contained in:
Chris Cochrun 2022-09-26 06:00:13 -05:00
parent 38f3ed245a
commit acbd167697
2 changed files with 14 additions and 2 deletions

View file

@ -130,6 +130,18 @@ Controls.Page {
id: serviceItemModel
}
Item {
id: keyHandler
anchors.fill: parent
focus: true
Keys.onLeftPressed: presentation.previousSlideAction()
Keys.onRightPressed: presentation.nextSlideAction()
Keys.onUpPressed: presentation.previousSlideAction()
Keys.onDownPressed: presentation.nextSlideAction()
Keys.onSpacePressed: presentation.nextSlideAction()
}
function changeServiceItem(index) {
const item = serviceItemModel.getItem(index);
print("index grabbed: " + index);