-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKeyMap.qml
59 lines (55 loc) · 1.24 KB
/
KeyMap.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import QtQuick 2.0
Item {
focus: true
Keys.onLeftPressed: controller.previousSlide()
Keys.onRightPressed: controller.nextSlide()
Keys.onSpacePressed: controller.nextSlide()
Keys.onTabPressed: controller.slideSelectorActive = !controller.slideSelectorActive
Keys.onPressed: {
if(event.key == Qt.Key_Q)
{
controller.quit();
event.accepted = true;
}
else if(event.key == Qt.Key_R)
{
controller.resetTime();
event.accepted = true;
}
else if(event.key == Qt.Key_MediaNext || event.key == Qt.Key_PageDown)
{
controller.nextSlide();
event.accepted = true;
}
else if(event.key == Qt.Key_MediaPrevious || event.key == Qt.Key_PageUp)
{
controller.previousSlide();
event.accepted = true;
}
else if(event.key == Qt.Key_P)
{
controller.triggerVideoPause();
event.accepted = true;
}
else if(event.key == Qt.Key_A)
{
controller.triggerVideoSeekBack();
event.accepted = true;
}
else if(event.key == Qt.Key_D)
{
controller.triggerVideoSeekFwd();
event.accepted = true;
}
else if(event.key == Qt.Key_Plus)
{
controller.triggerVideoFaster();
event.accepted = true;
}
else if(event.key == Qt.Key_Minus)
{
controller.triggerVideoSlower();
event.accepted = true;
}
}
}