Combine 2 keys pressed

Hello,
i´m making a 2 side scroller. I have one sprite for the attack when the character is static pressing the “X” and another sprite whith the same atack but while it is walking. The problem is that i can´t combine the 2 keys (moving and X ) for the moving attack. The character starts moving with the static sprite and then it starts to moving with the “moving attack” sprite.

Anyone could help me with the nodes?

thank you so much!