simplified key presses
This commit is contained in:
parent
9279db22f5
commit
74d5236408
2 changed files with 42 additions and 38 deletions
20
Content.qml
20
Content.qml
|
@ -78,25 +78,7 @@ ScrollView {
|
|||
}
|
||||
|
||||
onPostChanged: setPost()
|
||||
|
||||
Keys.onRightPressed: app.sidebar.next()
|
||||
Keys.onLeftPressed: app.sidebar.previous()
|
||||
Keys.onDownPressed: content.scrollDown(content.scrollJump)
|
||||
Keys.onUpPressed: content.scrollUp(content.scrollJump)
|
||||
Keys.onSpacePressed: content.scrollDown(content.pageJump)
|
||||
Keys.onEnterPressed: Qt.openUrlExternally(content.post.link)
|
||||
Keys.onReturnPressed: Qt.openUrlExternally(content.post.link)
|
||||
Keys.onPressed: {
|
||||
if(event.key === Qt.Key_Home) {
|
||||
content.scrollUp();
|
||||
} else if (event.key === Qt.Key_End) {
|
||||
content.scrollDown();
|
||||
} else if (event.key === Qt.Key_PageUp) {
|
||||
content.scrollUp(content.pageJump)
|
||||
} else if (event.key === Qt.Key_PageDown) {
|
||||
content.scrollDown(content.pageJump)
|
||||
}
|
||||
}
|
||||
Keys.onPressed: app.keyPressed(event)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue