# Drum Machine Question

**URL:** <https://forum.freecodecamp.org/t/drum-machine-question/469308>\
**Category:** I Built This\
**Created:** [July 14, 2021, 5:43pm UTC](https://forum.freecodecamp.org/t/drum-machine-question/469308 "2021-07-14T17:43:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yhsun21](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/yhsun21/32/215680_2.png) [@yhsun21](https://forum.freecodecamp.org/u/yhsun21)\
**Post date:** [July 14, 2021, 5:43pm UTC](https://forum.freecodecamp.org/t/drum-machine-question/469308/1 "2021-07-14T17:43:49Z")

</div>

Link to project: [https://codepen.io/yisun1/pen/gOWrybr](https://codepen.io/yisun1/pen/gOWrybr)

So I am fairly close to meeting the requirements for all the tests to pass except the last one I am stuck on.

“6. When I press the trigger key associated with each .drum-pad, the audio clip contained in its child element should be triggered (e.g. pressing the Q key should trigger the drum pad which contains the string “Q”, pressing the W key should trigger the drum pad which contains the string “W”, etc.).”

I’m not sure what I am doing wrong. When I click each of the keys it clearly plays a sound/drum-pad it is associated to. Has anyone run into a similar problem?

Thanks

---

<div class="post-metadata">

**Author:** ![bbsmooth](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bbsmooth/32/203556_2.png) [@bbsmooth](https://forum.freecodecamp.org/u/bbsmooth)\
**Post date:** [July 14, 2021, 5:48pm UTC](https://forum.freecodecamp.org/t/drum-machine-question/469308/2 "2021-07-14T17:48:40Z")

</div>

> [@yhsun21](#):
>
> When I click each of the keys it clearly plays a sound/drum-pad it is associated to.

The error is referring to pressing keys on your keyboard, not clicking keys with a mouse or touch. So you’ll need to add an event handler that listens for key presses.

---

<div class="post-metadata">

**Author:** ![yhsun21](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/yhsun21/32/215680_2.png) [@yhsun21](https://forum.freecodecamp.org/u/yhsun21)\
**Post date:** [July 14, 2021, 5:52pm UTC](https://forum.freecodecamp.org/t/drum-machine-question/469308/3 "2021-07-14T17:52:27Z")

</div>

Ahh that makes sense. Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [January 13, 2022, 5:52am UTC](https://forum.freecodecamp.org/t/drum-machine-question/469308/4 "2022-01-13T05:52:40Z")

</div>

Closed on January 13, 2022, 5:52am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
