This is what I did and it still didn't work.
if(key_space == 1 && key_space == 0)
{
key_space = 0;
jump_target = jump_height * time_step;
}
if(dist_down < 0 && key_space == 0)
{
key_space = 1;
}
I didn't do key_space_released because it couldn't find it so what I did was just say key_space off and on. But what it is doing is just hopping around when I hold the key.