From a5e061d4282eca6f2de062ddf2ee147f064b62c5 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 28 Apr 2019 21:20:08 -0400 Subject: [PATCH] Use correct key mods in HoverKey and SelectKey for RACK_HELD action. --- src/event.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/event.cpp b/src/event.cpp index 9c40a749..d4eb39d3 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -1,5 +1,7 @@ #include "event.hpp" #include "widget/Widget.hpp" +#include "app.hpp" +#include "window.hpp" namespace rack { @@ -170,7 +172,7 @@ bool State::handleButton(math::Vec pos, int button, int action, int mods) { bool State::handleHover(math::Vec pos, math::Vec mouseDelta) { // Fake a key RACK_HELD event for each held key - int mods = 0; //APP->window->getMods(); + int mods = APP->window->getMods(); for (int key : heldKeys) { int scancode = glfwGetKeyScancode(key); handleKey(pos, key, scancode, RACK_HELD, mods);