Lock to axis when drawing a path

Is there a way to lock points when drawing paths with path tools to get perfect 45deg, 90deg angles etc?

Sorry if this has been asked before I searched on hear and checked the manual and didn’t fined an answer.