SFML community forums

Help => Window => Topic started by: sparklehorse on February 14, 2010, 06:51:24 pm

Title: Key event issue on Linux?
Post 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
Title: Key event issue on Linux?
Post by: Laurent on February 14, 2010, 07:32:04 pm
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).
Title: Key event issue on Linux?
Post by: Daniel Benoy on July 11, 2010, 08:39:05 pm
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.
Title: Key event issue on Linux?
Post by: Daniel Benoy on July 11, 2010, 08:40:11 pm
This forum decided to be clever, and replaced what I typed with an image.  It was a colon, and then a close parenthesis.
Title: Key event issue on Linux?
Post by: Laurent on July 12, 2010, 08:16:29 am
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.