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

Function glfwMods

src/CardinalRemote/RemoteUI.cpp:200–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198// --------------------------------------------------------------------------------------------------------------------
199
200static int glfwMods(const uint mod) noexcept
201{
202 int mods = 0;
203
204 if (mod & kModifierControl)
205 mods |= GLFW_MOD_CONTROL;
206 if (mod & kModifierShift)
207 mods |= GLFW_MOD_SHIFT;
208 if (mod & kModifierAlt)
209 mods |= GLFW_MOD_ALT;
210 if (mod & kModifierSuper)
211 mods |= GLFW_MOD_SUPER;
212
213 /*
214 if (glfwGetKey(win, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS || glfwGetKey(win, GLFW_KEY_RIGHT_SHIFT) == GLFW_PRESS)
215 mods |= GLFW_MOD_SHIFT;
216 if (glfwGetKey(win, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS || glfwGetKey(win, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS)
217 mods |= GLFW_MOD_CONTROL;
218 if (glfwGetKey(win, GLFW_KEY_LEFT_ALT) == GLFW_PRESS || glfwGetKey(win, GLFW_KEY_RIGHT_ALT) == GLFW_PRESS)
219 mods |= GLFW_MOD_ALT;
220 if (glfwGetKey(win, GLFW_KEY_LEFT_SUPER) == GLFW_PRESS || glfwGetKey(win, GLFW_KEY_RIGHT_SUPER) == GLFW_PRESS)
221 mods |= GLFW_MOD_SUPER;
222 */
223
224 return mods;
225}
226
227bool CardinalRemoteUI::onMouse(const MouseEvent& ev)
228{

Callers 4

onMouseMethod · 0.70
onScrollMethod · 0.70
onCharacterInputMethod · 0.70
onKeyboardMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected