forked from jeena/FeedTheMonkey
added keyboard behaviour like scrolling, etc.
This commit is contained in:
parent
56ef57b112
commit
c474db9a0c
5 changed files with 61 additions and 8 deletions
18
main.qml
18
main.qml
|
@ -50,8 +50,22 @@ ApplicationWindow {
|
|||
|
||||
Keys.onRightPressed: sidebar.next()
|
||||
Keys.onLeftPressed: sidebar.previous()
|
||||
Keys.onDownPressed: content.scrollDown()
|
||||
Keys.onUpPressed: content.scrollUp()
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Login {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue