switch (event->Type) {
case sf::Event::KeyPressed:
OnKeyPress(event->Key.Code, event->Key.Alt, event->Key.Control, event->Key.Shift);
break;
}
void OnKeyPress(sf::Key::Code key, bool alt, bool ctrl, bool shift) {
// doesnt work
if (key == sf::Key::Num1) {
DoSomething();
}
// does work
if (key == sf::Key::F1) {
DoSomethingElse();
}
}
is there some reason doing it the way i am that will cause F1 to work but none the others ive tested?
tried Num1, Numpad1, & A but testing for any F key will work...