diff --git a/src/app/Knob.cpp b/src/app/Knob.cpp index 7410ff8d..2779a139 100644 --- a/src/app/Knob.cpp +++ b/src/app/Knob.cpp @@ -15,8 +15,12 @@ void Knob::onDragStart() { } void Knob::onDragMove(Vec mouseRel) { - // Drag slower if Ctrl is held + // Drag slower if Ctrl is held (Command on Mac) +#ifdef ARCH_MAC + if (guiIsKeyPressed(GLFW_KEY_LEFT_SUPER) || guiIsKeyPressed(GLFW_KEY_RIGHT_SUPER)) +#else if (guiIsKeyPressed(GLFW_KEY_LEFT_CONTROL) || guiIsKeyPressed(GLFW_KEY_RIGHT_CONTROL)) +#endif mouseRel = mouseRel.mult(0.1); setValue(value - KNOB_SENSITIVITY * (maxValue - minValue) * mouseRel.y); } diff --git a/src/gui.cpp b/src/gui.cpp index bbcd03b6..e7d9e3b0 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -35,6 +35,14 @@ void windowSizeCallback(GLFWwindow* window, int width, int height) { } void mouseButtonCallback(GLFWwindow *window, int button, int action, int mods) { +#ifdef ARCH_MAC + // Ctrl-left click --> right click + if (button == GLFW_MOUSE_BUTTON_LEFT) { + if (guiIsKeyPressed(GLFW_KEY_LEFT_CONTROL) || guiIsKeyPressed(GLFW_KEY_RIGHT_CONTROL)) + button = GLFW_MOUSE_BUTTON_RIGHT; + } +#endif + if (action == GLFW_PRESS) { // onMouseDown Widget *w = gScene->onMouseDown(gMousePos, button);