you should also use vec_normalize or the player is faster if you walk forward while strafing than just walk forward... (without strafing)
...
input_vec.x = (key_w - key_s);
input_vec.y = (key_a - key_d);
vec_normalize(input_vec,time * 5);
...