Trouble Making a Sound Play Upon Key Press

Hello! I'm trying to add a feature to my game where the player will press the Z key while on the field and it will play a clown honk sound. A honk button. I managed to get it working, sort of, but it only works when you press the D key (rather than Z) and only actually plays sometimes. Does anyone know how to get this working?

TL,DR: how do I get a sound effect to play whenever the player presses Z?
1) if it only plays sometimes, then you made a mistake with your event and we need a screenshot of it to help you solve that

2) Ace doesn't support a keyboard. The primary input device is a game controller, and when the conditional branch checks for "button pressed" it means the gamepad button :Z and not the key Z on the keyboard.
There is a function that maps a part of the keyboard to a simulated gamepad, and the player (not the developer) can change that key-mapping by pressing F1 in the game.

You'll need a script to implement full keyboard support.

Original thread: https://forums.rpgmakerweb.com/threads/trouble-making-a-sound-play-upon-key-press.81535/