Character animations by hitting keyboard buttons

I’m a newbie to Unreal and would like to know if there is a simple way to make a character do animation-movements by hitting certain keyboard buttons?

I have a character I’ve downloaded and put into Unreal and I want it to be idling with one animation and do an animation when I press the Z key and another animation when I press the X key. After finishing the animations, it has to go back to the idling animation. Can it be done in a very simple way? The character just needs to be standing in the same place.