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).

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).

Using sf::Event::KeyEvent i get something like "uncatched trown error" at visual studio, At .exe file my program crashesI googled it and people had same problem, so that's out of option.

Am just doing this

sf::Keyboard::isKeyPressed(sf::Keyboard::LShift) == true

It does not handle Caps lock but, sfml does not handle it as it seems.