Skip to content

Commit 14d7e40

Browse files
committed
Implement turbo mode shortcut
1 parent 1f4303e commit 14d7e40

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/app/main.qml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import QtQuick.Layouts
66
import ScratchCPP
77
import ScratchCPP.UiComponents
88
import ScratchCPP.Render
9+
import ScratchCPP.Keyboard
910

1011
ApplicationWindow {
1112
id: root
@@ -44,9 +45,13 @@ ApplicationWindow {
4445
icon.name: "green_flag"
4546
icon.color: "transparent"
4647
onClicked: {
47-
player.stop()
48-
player.start()
49-
player.forceActiveFocus(Qt.TabFocusReason);
48+
if (KeyboardInfo.keyboardModifiers() === Qt.ShiftModifier)
49+
AppMenuBar.turboMode = !AppMenuBar.turboMode
50+
else {
51+
player.stop()
52+
player.start()
53+
player.forceActiveFocus(Qt.TabFocusReason);
54+
}
5055
}
5156
}
5257

0 commit comments

Comments
 (0)