After some thought, I found a solution to this, but there are still some problems:P

I changed the code to this:
if (key_k) Player2.y -= 5 * time_step;
else Player2.y += 5 * time_step;

The problem this time is, if I press k once and then let it go, and then again pressing k I get more and more speed. Everytime I hit the key he adds more speed to him.