MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / glfwMods

Function glfwMods

src/CardinalUI.cpp:955–980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

953 // -------------------------------------------------------------------------------------------------------
954
955 static int glfwMods(const uint mod) noexcept
956 {
957 int mods = 0;
958
959 if (mod & kModifierControl)
960 mods |= GLFW_MOD_CONTROL;
961 if (mod & kModifierShift)
962 mods |= GLFW_MOD_SHIFT;
963 if (mod & kModifierAlt)
964 mods |= GLFW_MOD_ALT;
965 if (mod & kModifierSuper)
966 mods |= GLFW_MOD_SUPER;
967
968 /*
969 if (glfwGetKey(win, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS || glfwGetKey(win, GLFW_KEY_RIGHT_SHIFT) == GLFW_PRESS)
970 mods |= GLFW_MOD_SHIFT;
971 if (glfwGetKey(win, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS || glfwGetKey(win, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS)
972 mods |= GLFW_MOD_CONTROL;
973 if (glfwGetKey(win, GLFW_KEY_LEFT_ALT) == GLFW_PRESS || glfwGetKey(win, GLFW_KEY_RIGHT_ALT) == GLFW_PRESS)
974 mods |= GLFW_MOD_ALT;
975 if (glfwGetKey(win, GLFW_KEY_LEFT_SUPER) == GLFW_PRESS || glfwGetKey(win, GLFW_KEY_RIGHT_SUPER) == GLFW_PRESS)
976 mods |= GLFW_MOD_SUPER;
977 */
978
979 return mods;
980 }
981
982 bool onMouse(const MouseEvent& ev) override
983 {

Callers 5

onMouseFunction · 0.70
onMotionFunction · 0.70
onScrollFunction · 0.70
onCharacterInputFunction · 0.70
onKeyboardFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected