Shift+Number key produces a key code of '0' instead of the correct one #187

SoleSoul opened this Issue Mar 23, 2012 · 4 comments


None yet

2 participants


On Archlinux SFML version 1.99.git20120312-1
When catching an event of a number key press, for example Num1, while shift is held down, both

event.key.code == sf::Keyboard::Num1



return false.
If I print the event.key.code, the code is '0' for all of the numbers just as the code for ';' and 'A'. The shift press itself correctly reports the code 38.

while (window.isOpen())
    if(event.type == sf::Event::KeyPressed)
Simple and Fast Multimedia Library member

See #7


Thank you.
Is there a temporary workaround for catching a shift+number event?

Simple and Fast Multimedia Library member

You can catch sf::TextEntered events and watch numbers, but that won't be perfect (ie. any input method producing a number will trigger your code).


I'll try that.
Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment