The math for motion can be done per axis which helps simplify things.
We can just pick one axis as an example. You can do other axis in the same way.
x is the position, and vx is the velocity.
Constant speed:
x = x + vx*dt
acceleration:
vx = vx + 100*dt //100 is the acceration
x = x + vx*dt
So for a mario style example you could do x with constant speed and y with acceration. Then to jump you'd set vy to -200 or something.
On space pressed
-- set vy -200
You could also just apply the vy the while the button is pressed. Just use a timer too so you'd only set the velocity for so long.
xyz stuff is mostly a matter of mapping the third axis onto xy.