# Keylistener not working for Home key

**URL:** <https://forum.kirupa.com/t/keylistener-not-working-for-home-key/258036>\
**Category:** flash\
**Created:** [April 20, 2008, 1:16am UTC](https://forum.kirupa.com/t/keylistener-not-working-for-home-key/258036 "2008-04-20T01:16:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thegrrraue](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@thegrrraue](https://forum.kirupa.com/u/thegrrraue)\
**Post date:** [April 20, 2008, 1:16am UTC](https://forum.kirupa.com/t/keylistener-not-working-for-home-key/258036/1 "2008-04-20T01:16:38Z")

</div>

So I’ve got this code running:

var keyListener\_obj:Object = new Object();  
keyListener\_obj.onKeyDown = function() {  
if (Key.isDown(Key.HOME)) {  
gotoAndStop(1);  
}  
};  
Key.addListener(keyListener\_obj);

And it doesn’t work. I’ve tried adding a trace on it, and it appears that flash isn’t even seeing that the home key is being pressed. The code works fine if I make the key one of the arrow keys.

I also tried putting the number for Home (36) instead of the word home (so it looks like this (Key.36) ) but it still doesn’t work. Does anyone know why?

EDIT: So it appears that it DOES work, but only if the focus is on one of the input text boxes…
