SFML community forums
General => General discussions => Topic started by: n0_0ne on April 04, 2009, 10:28:36 am
-
Hello,
I think I found a little bug in the sf::Input class.
In my project IsKeyDown(sf::Key::Space) works fine, only in combination with sf::Key::Left + sf::Key::Up pressed, it will always return false. I don't think that I am doing anything wrong. Perhaps someone else could test it.
If it's really a bug, I hope it will be fixed in the next release :)
-
This is probably a limitation of your keyboard (thus you would have it with any other library). Some combinations of 3 or more keys are usually not working, due to how keyboards are made internally. USB or gamers keyboards don't suffer from this issue.
-
Yeah, that was also my first thought... but it works for example with Up+Right+Space... and I think there isn't a big difference between Right and Left arrows in my keyboard... So I thought it must be a problem inside SFML.
Edit: I tested a bit more... it seems, that there really is a problem with Left+Up+Space, if you press two of them, the third key won't be recognized anymore... but if I press Down instead of Up, or Right instead of Left, everything is fine. :?:
-
Try with the same computer, but another keyboard if you can.
-
Yeah, that was also my first thought... but it works for example with Up+Right+Space... and I think there isn't a big difference between Right and Left arrows in my keyboard... So I thought it must be a problem inside SFML.
Actually, keyboards are made of a matrix. The combinations which don't work are those involving the same row or column twice. So there might be a big difference between right and left arrow :)
-
It's a laptop so I can't use another keyboard that easy ^^
But in case of this matrix... Left is in the same row as Space... but Right is too, and it works... Can nobody just test these three keys with a normal usb keyboard?
-
The matrix doesn't have to be like your keyboard layout. :)
Even with a laptop you can attach an USB keyboard.
Edit: Open a text editor and hit Left+Up+Space to test your keyboard.
-
Ok I tested it again in a text editor... you were right, this error occurs there, too. I couldn't imagine and never realized, that my keyboard is that limited...
Sorry Laurent, that I doubted your incredible skillZ :D
-
I have the same issue, I recognized it when I first wanted to play Tony Hawk on my Laptop ;) Just have to live with it.
-
In most games you can remap the key configuration. Mostly character keys can be pressed more than special function keys. I remember having that issue some years before. ;)