From 1af06dae160d5e3c42b0a2d3e4d9e94cced31571 Mon Sep 17 00:00:00 2001 From: Parker Reed Date: Tue, 6 Mar 2018 12:24:02 -0500 Subject: [PATCH] Added media keys (Previous, Next, Play/Pause) to the handling. Help window updated accordingly. --- src/autoapp/Projection/InputDevice.cpp | 3 +++ src/autoapp/UI/SettingsWindow.cpp | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/autoapp/Projection/InputDevice.cpp b/src/autoapp/Projection/InputDevice.cpp index 81110e2..95d2a97 100644 --- a/src/autoapp/Projection/InputDevice.cpp +++ b/src/autoapp/Projection/InputDevice.cpp @@ -133,14 +133,17 @@ bool InputDevice::handleKeyEvent(QEvent* event, QKeyEvent* key) buttonCode = aasdk::proto::enums::ButtonCode::PAUSE; break; + case Qt::Key_MediaPrevious: case Qt::Key_V: buttonCode = aasdk::proto::enums::ButtonCode::PREV; break; + case Qt::Key_MediaPlay: case Qt::Key_B: buttonCode = aasdk::proto::enums::ButtonCode::TOGGLE_PLAY; break; + case Qt::Key_MediaNext: case Qt::Key_N: buttonCode = aasdk::proto::enums::ButtonCode::NEXT; break; diff --git a/src/autoapp/UI/SettingsWindow.cpp b/src/autoapp/UI/SettingsWindow.cpp index a8fe541..c520398 100644 --- a/src/autoapp/UI/SettingsWindow.cpp +++ b/src/autoapp/UI/SettingsWindow.cpp @@ -226,9 +226,9 @@ void SettingsWindow::onShowBindings() + QString("Call end -> [O] \n") + QString("Play -> [X] \n") + QString("Pause -> [C] \n") - + QString("Previous track -> [V] \n") - + QString("Next track -> [N] \n") - + QString("Toggle play -> [B] \n") + + QString("Previous track -> [V]/[Media Previous] \n") + + QString("Next track -> [N]/[Media Next] \n") + + QString("Toggle play -> [B]/[Media Play] \n") + QString("Voice command -> [M] \n") + QString("Wheel left -> [1] \n") + QString("Wheel right -> [2]");