]> git.sesse.net Git - pkanalytics/commitdiff
Add (hidden) PgUp/PgDn shortcuts for going +/- 2 mins.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 3 May 2023 19:07:21 +0000 (21:07 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 3 May 2023 19:07:21 +0000 (21:07 +0200)
main.cpp

index fc44d5cea0b9a11fa0afcf3d5e73a2f95d9f7f59..858cb16a353d820fbc360672f7f4a8b0bb1f8ab7 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -66,6 +66,13 @@ MainWindow::MainWindow(EventsModel *events, PlayersModel *players) : events(even
 
        video->setVideoOutput(ui->video);
 
+       // It's not really clear whether PgUp should be forwards or backwards,
+       // but mpv does at least up = forwards, so that's probably standard.
+       QShortcut *pgdown = new QShortcut(QKeySequence(Qt::Key_PageDown), this);
+       connect(pgdown, &QShortcut::activated, [this]() { seek(-120000); });
+       QShortcut *pgup = new QShortcut(QKeySequence(Qt::Key_PageUp), this);
+       connect(pgup, &QShortcut::activated, [this]() { seek(120000); });
+
        connect(ui->minus10s, &QPushButton::clicked, [this]() { seek(-10000); });
        connect(ui->plus10s, &QPushButton::clicked, [this]() { seek(10000); });