MCPcopy Create free account
hub / github.com/DISTRHO/DPF / translateVST3Modifiers

Function translateVST3Modifiers

distrho/src/DistrhoUIVST3.cpp:104–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102// --------------------------------------------------------------------------------------------------------------------
103
104static uint translateVST3Modifiers(const int64_t modifiers) noexcept
105{
106 using namespace DGL_NAMESPACE;
107
108 uint dglmods = 0;
109 if (modifiers & (1 << 0))
110 dglmods |= kModifierShift;
111 if (modifiers & (1 << 1))
112 dglmods |= kModifierAlt;
113 #ifdef DISTRHO_OS_MAC
114 if (modifiers & (1 << 2))
115 dglmods |= kModifierSuper;
116 if (modifiers & (1 << 3))
117 dglmods |= kModifierControl;
118 #else
119 if (modifiers & (1 << 2))
120 dglmods |= kModifierControl;
121 if (modifiers & (1 << 3))
122 dglmods |= kModifierSuper;
123 #endif
124
125 return dglmods;
126}
127
128/**
129 * Helper class for getting a native idle timer.

Callers 2

onKeyDownFunction · 0.85
onKeyUpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected