Need help with Vector2

My level is beginner, so i started from the basic movements. Before to write here, i checked all the possible documentations for this method.
this is some of working code of my 4 way movement from my player script that explains how it moves

private void GetInput()
{

direction = Vector2.zero;

if (Input.GetKey (KeyCode.W))
{
direction += Vector2.up;
}
if (Input.GetKey (KeyCode.A))
{
direction += Vector2.left;
}
if (Input.GetKey (KeyCode.S))
{
direction += Vector2.down;
}
if (Input.GetKey (KeyCode.D))
{
direction += Vector2.right;

P.S. up, down,left,right is the shorthands for the coordinates.

But my next step is to movie object in betweens,

logically it should be like this?

if (Input.GetKey (KeyCode.A) && !Input.GetKey (KeyCode.S)) // so the Unity knows that i pressed two button at the same time
{
direction += Vector2.left + Vector2.down;

and this should point at the specific position on the coordinate system

I have doubts because when i press A(left) the object plays not old(left_animation), but new (left_down_animation), even i didn’t press two buttons at the same time. And the right animation won’t play either.

i also use nodes, which contains x&y coordinate parameters & conditions.

So my question, is it possible to complete my 8way movement by using this method? Any suggestions will be welcomed.

Thank you!

Fresh idea. Maybe better not to code the inbetween movement, because when i press for example left & down button together, the object moves inbetween anyway?

So is it better to code only that - when i press two specific buttons, the object will play the right animation?

You are right, for the movement, you just need to code each key separately but not for the animation.
Also note that your “inbetween” movements will be faster than the others . You have to normalize your vectors.

im afraid it will looks not how i want it to be. Right now, for example if i move left, when i stop, the system know that it should stay in left idle_image, but if i will animate the inbetween button combinations, the system will not know what to do after i stop press button combinations.

Any advices on that?

I also tested this function -

if (Input.GetKey (KeyCode.S) && !Input.GetKey (KeyCode.A))
{
Debug.Log(“Pressed.”);
}

and how i thought, this not worked for the two pressed buttons for a same time, only for the one, in this case - S button.

Update. !Input.GetKey (KeyCode.A)) - ! was wrong.