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

Method KeyPressed

Source/EQModule.cpp:418–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416}
417
418void EQModule::KeyPressed(int key, bool isRepeat)
419{
420 IDrawableModule::KeyPressed(key, isRepeat);
421 if (mHoveredFilterHandleIndex != -1)
422 {
423 auto* qSlider = mFilters[mHoveredFilterHandleIndex].mQSlider;
424 if (key == '\\')
425 {
426 qSlider->ResetToOriginal();
427 }
428 else if (key == '[')
429 {
430 qSlider->Halve();
431 }
432 else if (key == ']')
433 {
434 qSlider->Double();
435 }
436 else if ((toupper(key) == 'C' || toupper(key) == 'X') && GetKeyModifiers() == kModifier_Command)
437 {
438 TheSynth->CopyTextToClipboard(ofToString(qSlider->GetValue()));
439 }
440 }
441}
442
443void EQModule::FloatSliderUpdated(FloatSlider* slider, float oldVal, double time)
444{

Callers

nothing calls this directly

Calls 7

GetKeyModifiersFunction · 0.85
ofToStringFunction · 0.85
CopyTextToClipboardMethod · 0.80
ResetToOriginalMethod · 0.45
HalveMethod · 0.45
DoubleMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected