# keyDown VS. keyWentDown

**URL:** https://forum.code.org/t/keydown-vs-keywentdown/36010
**Category:** CS Discoveries
**Tags:** csd-unit-3
**Created:** [March 11, 2022, 7:37pm UTC](https://forum.code.org/t/keydown-vs-keywentdown/36010 "2022-03-11T19:37:40Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![melynn](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/melynn/32/4925_2.png) [@melynn](https://forum.code.org/u/melynn)
#### Post date: [March 12, 2022, 2:51pm UTC](https://forum.code.org/t/keydown-vs-keywentdown/36010/4 "2022-03-12T14:51:13Z")

</div>

I teach to test different conditions to make sure the outcome remains the same (clicking often to jump the frog, clicking just once). If the tests are the outcome the student wants, in my mind, I don’t think it matters which one you use (keyDown or keyWentDown).

For the health to only decrease by one, there are a few methods outlined in this really [informational post](https://forum.code.org/t/u3l16-collision-score-limiting-to-1/13766/3) (find josh’s response). The easiest way by far is to move the mushroom’s position so that the sprites are no longer touching but there are other ways outlined in the post. FYI - hiding the mushroom (or making it invisible) won’t work but hiding its position (an x position off the screen) would work. In this game, I would just quickly move it an x position that allows it to skip over the frog. Good luck!

~Michelle

---

_[View the full topic](https://forum.code.org/t/keydown-vs-keywentdown/36010)._
