# Problem with Key.isDown(Key.ENTER)

**URL:** <https://forum.kirupa.com/t/problem-with-key-isdown-key-enter/175969>\
**Category:** Uncategorized\
**Created:** [January 19, 2006, 8:13am UTC](https://forum.kirupa.com/t/problem-with-key-isdown-key-enter/175969 "2006-01-19T08:13:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayteq](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ayteq/32/2058_2.png) [@ayteq](https://forum.kirupa.com/u/ayteq)\
**Post date:** [January 19, 2006, 8:13am UTC](https://forum.kirupa.com/t/problem-with-key-isdown-key-enter/175969/1 "2006-01-19T08:13:09Z")

</div>

this code now works with an button. but i want with keywords for example ENTER. but i cant do that.

```auto
on (press)
{
_root.buton_add.enabled =false;
_root.mix_it();
_root.buton_letter_add();
_root.buton_answer_add(_root.words);
_root.greenn._visible=false;
_root_bluee._visible=false;
_root.passed_it.text="";
for (i=0;i<_root.questions.length;i++)
 {
  if (_root.words==_root.questions*.toUpperCase())
  {
  _root.puan=_root.puan+_root.questions*.length*(_root.index_no+1);
  _root.txtpuan.text=_root.puan;
  _root.temp_timer=_root.temp_timer+_root.questions*.length;
  _root.questions.splice(i,1);
  }
 }
if (_root.questions.length==0)
{
 _root.bitti();
}
 
}

```

i write like this but it doesnt work. although i hit ENTER, anything happens.

```auto
 
buton_add.onKeyDown = function() {
 if (Key.isDown(Key.ENTER)) {
_root.buton_add.enabled =false;
_root.mix_it();
_root.buton_letter_add();
_root.buton_answer_add(_root.words);
_root.greenn._visible=false;
_root_bluee._visible=false;
_root.passed_it.text="";
for (i=0;i<_root.questions.length;i++)
 {
  if (_root.words==_root.questions*.toUpperCase())
  {
  _root.puan=_root.puan+_root.questions*.length*(_root.index_no+1);
  _root.txtpuan.text=_root.puan;
  _root.temp_timer=_root.temp_timer+_root.questions*.length;
  _root.questions.splice(i,1);
  }
 }
if (_root.questions.length==0)
{
 _root.bitti();
}
 }
}

```

thanks
