Setting an animation to play when no keys are being pressed

Hi, I’m currently working on a project, and I trying to make it so that when i stop moving my character, the idle animation takes over, and then the other animations take effect after i press keys, then will go back to the idle after i don’t press anything. Anyone got any ideas?

Learn from the source:

good start ^^

some links to follow up & continue from there:
(to elaborate on Adeptus’s link above & be more specific)

you should find one of these that should elaborate on the subject