Found a way to avoid precedence of left upon right, and have the last direction key have the lead.
I applied the state concept and its implementation learned in terminal hacker (currentScreen if you remember ) to the direction pressed by the user. 5 states and the transitions between them :
Input.GetKeyDown and Input.GetKeyUp are used
Regarding coding :
add a state variable out of the functions :
ProcessInput() looks like that :
With this extra function :