SFML community forums

Help => Window => Topic started by: amin.v on November 09, 2017, 04:10:32 pm

Title: KeyRepeat only for TextEntered event
Post by: amin.v on November 09, 2017, 04:10:32 pm
hi

is it possible to get key repeat only for TextEntered event because i use this event for GUI text input which is usefull but i also use KeyPressed/KeyReleased for game logic which then key repeat is not usefull there.
Title: Re: KeyRepeat only for TextEntered event
Post by: eXpl0it3r on November 09, 2017, 04:16:42 pm
You can enable/disable it when you switch between GUI and in-game controls, alternatively you could ignore the additional KeyPresses if you haven't received a KeyRelease.
Title: Re: KeyRepeat only for TextEntered event
Post by: achpile on November 09, 2017, 05:04:11 pm
you can use sf::Keyboard::isKeyPressed for game logic :) it's better way imo
Title: Re: KeyRepeat only for TextEntered event
Post by: amin.v on November 09, 2017, 09:11:35 pm
You can enable/disable it when you switch between GUI and in-game controls, alternatively you could ignore the additional KeyPresses if you haven't received a KeyRelease.

Quote
you can use sf::Keyboard::isKeyPressed for game logic :) it's better way imo

Thank you both for reply  ;)