# Problem with AddListener

**URL:** <https://forum.kirupa.com/t/problem-with-addlistener/199803>\
**Category:** flash\
**Created:** [September 6, 2006, 8:38am UTC](https://forum.kirupa.com/t/problem-with-addlistener/199803 "2006-09-06T08:38:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasvarghese](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jasvarghese](https://forum.kirupa.com/u/jasvarghese)\
**Post date:** [September 6, 2006, 8:38am UTC](https://forum.kirupa.com/t/problem-with-addlistener/199803/1 "2006-09-06T08:38:19Z")

</div>

this is my code…

var myListener:Object = new Object();  
Key.addListener(myListener);  
myListener.onKeyDown = myOnKeyDown;  
Accessibility.updateProperties();  
function myOnKeyDown()  
{  
if (Key.isDown(Key.CONTROL) && Key.getCode() == 55)  
{  
trace(“right”);  
}  
}

here i used the key 7 along with the control key to check a specified action.  
wen i am trying to use some other keys instead of key 7, it’s not working…  
like when i am using key A or something like that, the function is not working in a proper way…  
can anybody help me…  
plz…
