How to boost the velocity in any direction?

Im trying to implement bhopping into my game and im going for something like the bhopping in Painkiller.

I want to boost the velocity relative to where im looking and which key im pressing durring the jump.

Bunny Hop The Old School Way Preview Painkiller - YouTube This is what I want to achieve, anyone knows how to do this in c++?