MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / GetKeyModifiers

Function GetKeyModifiers

Source/SynthGlobals.cpp:565–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565int GetKeyModifiers()
566{
567 int ret = 0;
568 if (ModifierKeys::currentModifiers.isShiftDown())
569 ret |= kModifier_Shift;
570 if (ModifierKeys::currentModifiers.isAltDown())
571 ret |= kModifier_Alt;
572#if BESPOKE_MAC
573 if (ModifierKeys::currentModifiers.isCtrlDown())
574 ret |= kModifier_Control; //control and command interfere with each other on non-mac keyboards
575#endif
576 if (ModifierKeys::currentModifiers.isCommandDown())
577 ret |= kModifier_Command;
578 return ret;
579}
580
581bool IsKeyHeld(int key, int modifiers)
582{

Callers 15

OnKeyPressedMethod · 0.85
MoveCaretMethod · 0.85
MidiReceivedMethod · 0.85
DrawModuleMethod · 0.85
OnKeyPressedMethod · 0.85
KeyPressedMethod · 0.85
DrawModuleMethod · 0.85
OnClickedMethod · 0.85
ButtonClickedMethod · 0.85
CanAdjustMultisliderMethod · 0.85
KeyPressedMethod · 0.85
ButtonClickedMethod · 0.85

Calls

no outgoing calls

Tested by 1

ButtonClickedMethod · 0.68