SFML community forums

Help => Window => Topic started by: Nexus on October 30, 2009, 09:33:16 pm

Title: sf::Event::TextEntered - key repeat bug?
Post by: Nexus on October 30, 2009, 09:33:16 pm
Hi,

I noticed that the TextEntered event is triggered repeatedly, even if sf::Window::EnableKeyRepeat(false) was previously called. I don't consider this behaviour intended. ;)

Short and complete example:
Code: [Select]
#include <SFML/Window.hpp>
#include <iostream>

int main()
{
sf::Window App(sf::VideoMode(100, 100), "TextEntered Bug?");
App.EnableKeyRepeat(false);

while (App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::TextEntered)
std::cout << "TextEntered!" << std::endl;
else if (Event.Type == sf::Event::Closed)
App.Close();
}
App.Display();
}
}
Title: sf::Event::TextEntered - key repeat bug?
Post by: Laurent on October 31, 2009, 12:42:21 am
Absolutely. I'll fix this tomorrow ;)

Thanks for your feedback.
Title: sf::Event::TextEntered - key repeat bug?
Post by: Laurent on October 31, 2009, 05:24:36 pm
It's fixed in trunk (I haven't synchronized the sfml2 branch yet).
Title: sf::Event::TextEntered - key repeat bug?
Post by: Nexus on October 31, 2009, 08:13:54 pm
Thanks a lot for the fast bugfix! :)