SFML community forums

Help => Window => Topic started by: KageJittai on March 15, 2011, 02:28:25 am

Title: TextEntered vs. KeyPressed
Post by: KageJittai on March 15, 2011, 02:28:25 am
I have a text box, when players enter text it will display.   I am having issues though as it seems that one key pressed will generate TWO events.

How can I determine which event I should listen to, and when.

Secondly, how can I flag the other events so it can be ignored further down the widget tree.
Title: TextEntered vs. KeyPressed
Post by: KageJittai on March 15, 2011, 06:37:15 am
NVM, I got it working... somehow
Title: TextEntered vs. KeyPressed
Post by: Groogy on March 15, 2011, 11:33:25 pm
For further reference. TextEvent is to handle typing much easier. It will handle the modifiers on the keys for you. Like shift and so. So a text event will give you a already formatted character when received.

At least that's my impression.
Title: TextEntered vs. KeyPressed
Post by: OniLinkPlus on March 15, 2011, 11:39:04 pm
Quote from: "Groogy"
For further reference. TextEvent is to handle typing much easier. It will handle the modifiers on the keys for you. Like shift and so. So a text event will give you a already formatted character when received.

At least that's my impression.
It also allows unicode characters which might not be supported by KeyPressed