Your approach is to directly influence a distance vector and move the player according to that vector. That is a very simple approach. Another simple yet much better looking approach is to work with forces and speeds.

It basically goes like this:
1. Assemble a force vector - basically the way you already did by checking if the wasd or arrow keys are pressed and adding an extra boost for the shift key. But this time you do not multiply with time_factor.
2. Do an extra check for the players height. Is the player a certain distance over the ground? If so then apply gravity, i.e. a force downwards. If not, well, then check if the jump key is pressed and if so add an upwards force.
3. You have got a second vector called speed. Initially all speed components are zero. Now you can accelerate the current speed by the force vector you just assembled. You get a current speed and can move your player by this speed vector.

For accelerating you can use the function vec_accelerate. That is still relatively simple, but the results should be much better. Does that give you the idea what to do next?


Always learn from history, to be sure you make the same mistakes again...