How do i check if caps lock is ON or OFF
I cannot find it anywhere is there a way to check if it is on?
sf::Event EventList;
while(obj_AppMain.GETR_Screen().pollEvent(EventList))
{
switch(EventList.type)
{
default:
break;
}
}
sf::Event EventList;
while(obj_AppMain.GETR_Screen().pollEvent(EventList))
{
switch(EventList.type)
{
default:
break;
}
}
In SFML capslock applies the "shift" modifier; I don't think you can poll the key directly.
However, if your intent is to create formatted text, you could use sf::Event::TextEvent which handles that for you.
Or, when you get sf::Event::KeyEvent, it has a bool shift member variable which can tell you if you need to capitalize the character or not (I think this takes capslock into account).
sf::Keyboard::isKeyPressed(sf::Keyboard::LShift) == true