I've got a problem while toggling input language (Native/English) on the keyboard in my SFML application. In my OS Windows XP SP3 I set up the shortcut Shift+Ctrl for this option. But the language does not toggle. Other apps work fine. To do the trick I'm using the following key sequence: press Shift, press Ctrl, release Ctrl, press Alt, release Alt, release Shift.
Here is the test code:
#include "stdafx.h"
#include "SFML/Graphics.hpp"
int _tmain(int argc, _TCHAR* argv[])
{
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
sf::String str;
sf::Text text;
while (window.IsOpened())
{
sf::Event evnt;
while (window.GetEvent(evnt))
{
if (evnt.Type == sf::Event::Closed)
window.Close();
if (evnt.Type == sf::Event::TextEntered)
{
str += evnt.Text.Unicode;
text.SetString(str);
}
}
window.Clear();
window.Draw(text);
window.Display();
}
return 0;
}
I guess there's something wrong with keyboard events handling. Is there any workaround for this behaviour? :?