# Listener Not working

**URL:** <https://forum.kirupa.com/t/listener-not-working/227171>\
**Category:** Uncategorized\
**Created:** [May 28, 2007, 3:38am UTC](https://forum.kirupa.com/t/listener-not-working/227171 "2007-05-28T03:38:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeoffR](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@GeoffR](https://forum.kirupa.com/u/GeoffR)\
**Post date:** [May 28, 2007, 3:38am UTC](https://forum.kirupa.com/t/listener-not-working/227171/1 "2007-05-28T03:38:13Z")

</div>

I am trying to add a key listener. I’m pretty sure this was working recently, but now it isn’t, and can’t figure out what is preventing it… any ideas? I am saving in Flash 6.

var myListener:Object = new Object();  
myListener.onKeyDown = function()  
{  
if (Key.isDown(Key.SHIFT))  
{  
trace (“hello”);  
}  
};  
//  
Key.addListener(myListener);

Thanks!  
Geoff
