Please make use of the code=cpp tag in this forum.
I strongly advise you to use SFML 2. SFML 1.6 hasn't changed in over 2 years and contains many bugs and lacks quite a few features.
The problem with your code might be that you call GetEvent twice in a row, thus when only one event is triggered when the key is pressed it won't get proccessed. Only call GetEvent with the while statement.
Btw if(x==true) is useless, just write if(x) for the same effect.