SFML community forums
Help => Window => Topic started by: sparklehorse on February 14, 2010, 06:51:24 pm
-
Hi,
I was wondering if there is a known issue with certain key events (or rather key codes) on Linux.
I'm using SFML 1.5 on Ubuntu (9.10), and while SFML reports all key pressed/releases correctly, the Code member is sometimes unset (i.e. 0) for keys that I would expect to work (for example the tilde key, or the caps lock key).
Interestingly enough, the text event that follows the key event always generates the correct unicode symbol for the pressed key.
Best regards,
Matthias
-
Yes, I need to write a more complete handling for key codes, some keys are not recognized with some keyboard configurations (this task already exists in the task list, by the way).
-
Is there a workaround available? I'm trying to make a chat game, and not being able to type:
:)
would be a problem...
In fact, it would be nice if this engine supported unicode, in case I get any international players.
-
This forum decided to be clever, and replaced what I typed with an image. It was a colon, and then a close parenthesis.
-
For text you should use the TextEntered event, not the KeyPressed one. The former always gives you the unicode character that you typed, no matter what keyboard configuration you have.