Crouch/roll animation input being held or stopped too early

I set up a crouch/roll animation for my 2d side scroller character and mapped it to the “C” key. When I press the key and release the button quickly the animation only plays a couple frames and then reverts back to my idle or run anim. Is there a way to make the entire animation play through without the ability to spam the button or hold it.