Browse Source

No longer require caps lock for QWERTY keyboard MIDI driver

pull/1639/head
Andrew Belt 7 years ago
parent
commit
c33e129565
1 changed files with 8 additions and 10 deletions
  1. +8
    -10
      src/window.cpp

+ 8
- 10
src/window.cpp View File

@@ -263,16 +263,6 @@ void charCallback(GLFWwindow *window, unsigned int codepoint) {
}

void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods) {
// Keyboard MIDI driver
if (mods & GLFW_MOD_CAPS_LOCK) {
if (action == GLFW_PRESS) {
keyboardPress(key);
}
else if (action == GLFW_RELEASE) {
keyboardRelease(key);
}
}

if (action == GLFW_PRESS || action == GLFW_REPEAT) {
if (gFocusedWidget) {
// onKey
@@ -288,6 +278,14 @@ void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods
e.key = key;
gScene->onHoverKey(e);
}

// Keyboard MIDI driver
if (action == GLFW_PRESS) {
keyboardPress(key);
}
else if (action == GLFW_RELEASE) {
keyboardRelease(key);
}
}

void dropCallback(GLFWwindow *window, int count, const char **paths) {


Loading…
Cancel
Save