How to not be able to exit vehicle when accelerating/steering?

I want my character to not be able to exit the vehicle when you’re accelerating/steering (pressing the movement buttons, W,A,S,D) How do I do this? I know it has something to do with boolean but im unable to get the right settings hooked up. As soon as i press the steering (A,D) i cant exit anymore when i stop steering again.