Aha! It only happens in windowed mode, so I think I know what the problem might be:
In Windows, Left ALT normally activates the active window's menu, so maybe SFML only receives the event once the (invisible) menu is deactivated.
Left-mouse-clicking the window after Left ALT clicking also produces the key-up event, so that kind of confirms it.
And a final confirmation: Pressing Space after Left ALT actually produces a menu.
Here is a minimal example to play with:#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600), "SFML");
sf::String sfStr;
while (App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
App.Close();
else if( Event.Type == sf::Event::KeyPressed )
sfStr.SetText( L"Key Pressed" );
else if( Event.Type == sf::Event::KeyReleased )
sfStr.SetText( L"Key Released" );
}
App.Clear();
App.Draw( sfStr );
App.Display();
}
return EXIT_SUCCESS;
}
Maybe there is a way you could disable this pesky menu altogether?