How I can turn off inertia the character?

There is a character. When he is jumping, he is moves forward by inertia (if he ran before), but I need him to move in a jump only when pressing the keys W A S D. How I can do this?

My pause system for AI works by stopping all movement of characters. Not the best way but im gonna use that as reference for what im telling you so it may or may not work. First get a reference to the movement component on your character. Then in your jump function make a call to StopMovementImmediately() and then add your jump velocity. If you dont want any air movement you can disable the controller as well but I dont recommend that because its kind of wonky once you reenable it