This problem can occur if your framerate is low, causing some of the keypresses to be ignored.
To achieve a more stable framerate, you can try turning off some of the options in Video Settings -> Advanced Options. Also try lowering the screen resolution.
You should also close any background applications that are not required to run the game.