you have to hold down the button or if you just press it.it won't work if you just press it
and why i plan to use a key like this for quick change when the enemies is get nearby and you still doing another action and game over that why i prefer to code the control like this
control
use arrow key to walk
hold a to punch (+ 15 score)
hold s to kick (+15 score)
hold d to shoot (+10 score)
hold 2 while shooting to change the gun
hold e to use knife(+ 10 score)
hold w to use vaccine(+10 score)
hold q to set up the bomb (while stand in front of building)
that all i have to say.