Browse Source

Use correct key mods in HoverKey and SelectKey for RACK_HELD action.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
a5e061d428
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/event.cpp

+ 3
- 1
src/event.cpp View File

@@ -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);


Loading…
Cancel
Save