Hello guys (it’s me again ^^),
I explain my problem, I want that when the user presses “a” it displays a menu and when it presses “b” it displays a window (for example) but if it remains press “a” it continues a display a menu ,
void SometApp::keyDown(KeyEvent event)
{
app:console() << event.getCode() << endl;
switch (event.getCode())
{
case 98: {
if(keyPressedBefore == 97){
//some stuff
}
break;
}
case 97: {
keyPressedBefore = 97;
break;
}
default:
break;
}
}
So if i press “a” then “b” then i stop press “b” the programm will display 97 then 98 then nothing ,while I would like it to display 97.
Is there a way to fix my problem ? Or I have to turn to a simpler solution ?
Thank you very much for your feedback