more versatile key handling
This allows us to later add and tweak the keyboard keys used to navigate the slides and UI.
This commit is contained in:
parent
175b327c5c
commit
554dbc7d29
1 changed files with 20 additions and 5 deletions
|
@ -289,11 +289,26 @@ FocusScope {
|
||||||
id: keyHandler
|
id: keyHandler
|
||||||
/* anchors.fill: parent */
|
/* anchors.fill: parent */
|
||||||
focus: true
|
focus: true
|
||||||
Keys.onLeftPressed: previousSlideAction()
|
Keys.onPressed: {
|
||||||
Keys.onRightPressed: nextSlideAction()
|
if (event.key == Qt.Key_J)
|
||||||
Keys.onUpPressed: previousSlideAction()
|
nextSlideAction();
|
||||||
Keys.onDownPressed: nextSlideAction()
|
if (event.key == Qt.Key_L)
|
||||||
Keys.onSpacePressed: nextSlideAction()
|
nextSlideAction();
|
||||||
|
if (event.key == Qt.Key_Right)
|
||||||
|
nextSlideAction();
|
||||||
|
if (event.key == Qt.Key_Down)
|
||||||
|
nextSlideAction();
|
||||||
|
if (event.key == Qt.Key_K)
|
||||||
|
previousSlideAction();
|
||||||
|
if (event.key == Qt.Key_H)
|
||||||
|
previousSlideAction();
|
||||||
|
if (event.key == Qt.Key_Up)
|
||||||
|
previousSlideAction();
|
||||||
|
if (event.key == Qt.Key_Left)
|
||||||
|
previousSlideAction();
|
||||||
|
if (event.key == Qt.Key_P)
|
||||||
|
SlideObject.playPause();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue