# Can I addListener to SPACE bar in Flash Lite 2.1?

**URL:** <https://forum.kirupa.com/t/can-i-addlistener-to-space-bar-in-flash-lite-2-1/224956>\
**Category:** programming\
**Created:** [May 7, 2007, 3:13pm UTC](https://forum.kirupa.com/t/can-i-addlistener-to-space-bar-in-flash-lite-2-1/224956 "2007-05-07T15:13:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![norman76](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@norman76](https://forum.kirupa.com/u/norman76)\
**Post date:** [May 7, 2007, 3:13pm UTC](https://forum.kirupa.com/t/can-i-addlistener-to-space-bar-in-flash-lite-2-1/224956/1 "2007-05-07T15:13:30Z")

</div>

I am currently developing an interactive language learning program for Flash Lite 2.1 for Windows Mobile devices.  
I need to give the spacebar some specific functionality by using the addListener in flash Lite 2.1. The code below works for every key on my Motorola Q except the SPACE bar. I’ve noticed that the space bar is reserved in Flash Lite for toggling the Full Screen option. I was wondering if there was a way to bypass this option in order to be able to listen to the Space Bar.

The code that I am using is the same code shown in the Flash 8 help for listening to keys… and it works fine with every key on my Motorola Q except the SPACE bar.

var keyListener = new Object();  
keyListener.onKeyUp = function() {  
if(Key.getCode() == Key.SPACE) {  
trace(“Space!”);  
}  
};  
Key.addListener(keyListener);

Thanks in advance!

Norman
