# Checking if a key is down?

**URL:** <https://forum.kirupa.com/t/checking-if-a-key-is-down/192835>\
**Category:** flash\
**Created:** [July 1, 2006, 7:58pm UTC](https://forum.kirupa.com/t/checking-if-a-key-is-down/192835 "2006-07-01T19:58:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)\
**Post date:** [July 1, 2006, 7:58pm UTC](https://forum.kirupa.com/t/checking-if-a-key-is-down/192835/1 "2006-07-01T19:58:26Z")

</div>

Hi, I’m trying to make a code that checks if the enter key is down, then a function will run every second.

I’ve tried:

```auto
if (key.isDown(key.ENTER) {
setInterval(rectDecrease,1000);
}

```

How would I make flash constantly check this instead of just once?
