How to use/apply multiple animations correctly?

So I have the animation that moves character’s right hand to the middle of screen if you press and hold the left mouse key. How can I make an another animation that shakes the hand in the middle of screen when pressing another key?

I tried to make another animation for the same body part (hand), but two animations don’t seem to interfere well.

For scripting I use JavaScript and commands like:

-to play the animation “anim1”:
animation[“anim1”].speed = 1;
-to pause the animation:
animation[“anim1”].speed = 0;

Create an Avatar/Body Mask and in Mecanim place the animation in a higher layer, with the Mask. The Mask defines which bones are used. If you place it as an Additive animation it will work alongside other animations when you adjust the Layer Weight. Again, the additive anim must be in a higher layer.