Handling of "mod" keys like only with 1.0 API?


#1

I feel dumb for not noticing this before, but it looks as if rack 0.6 plugin api does not give the keyboard modifiers along with the event? Seems like 1.0 has onSelectKey which gives all kinds of goodies, including mod. But 0.6 only has OnKey which give you the keycode and nothing else.

Do I have that right?


(Andrew Belt) #2

You can inspect the GLFW state manually, or use the window functions that do it for you, like

bool windowIsModPressed();
bool windowIsShiftPressed();

Note that onSelectKey() is called on selected widgets. onKey() in 0.6 is called onHoverKey() in 1.0.


#3

Ah, thanks. Perfect. the new onHoverKey looks very nice.