Problem with an animation in drag and drop

So, in my platforming game, i wanted to make it to where you would kill enemies and break boxes with a sword. So, i made the sprites i needed, one for the character and an animation for them swinging their sword. I was able to get it the character to switch to the sword animation at the press of the shift key, however, then my sword swing animation just kept looping non-stop. How do i fix this so it only swings once for every press of the shift key?