jvcleave / ofxImGui

Use ImGui in openFrameworks
296 stars 124 forks source link

ctrl key #23

Open andreirt opened 8 years ago

andreirt commented 8 years ago

I was trying to understand why CTRL + Click was not working on sliders, when I looked at BaseEngine. I think onKeyPressed should look like:

void BaseEngine::onKeyPressed(ofKeyEventArgs& event)
{
    if (event.key == OF_KEY_CONTROL) {
        io->KeyCtrl = true; // this makes ctrl + click work on sliders
    }
    else {
        int key = event.keycode;
        io->KeysDown[key] = true;
    }

    //io->AddInputCharacter((unsigned short)event.codepoint);
}

Best, Andrei