# Disabling keys w/actionscript?

**URL:** <https://forum.kirupa.com/t/disabling-keys-w-actionscript/101866>\
**Category:** Uncategorized\
**Created:** [February 15, 2004, 4:07am UTC](https://forum.kirupa.com/t/disabling-keys-w-actionscript/101866 "2004-02-15T04:07:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GLHeX](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@GLHeX](https://forum.kirupa.com/u/GLHeX)\
**Post date:** [February 15, 2004, 4:07am UTC](https://forum.kirupa.com/t/disabling-keys-w-actionscript/101866/1 "2004-02-15T04:07:47Z")

</div>

Hey what’s up? Long time reader first time poster. =P

(This question pertains to a game I am making, but the question itself is about actionscript. Not game programming.)

Okay I’m making a game in which the player must use the num pad keys to toggle switches. Which is no sweat but theres a huge problem. That flipping numlock key. If it’s off the key codes change using Key.getCode(); or Key.getAscii();

So for example when the numlock is on 1 returns key code 97. But when numlock is off it returns 35 (for the key ‘End’).

Is there a way to disable or set the numlock key to on or ‘toggled’ when starting a flash movie?

Any ideas/help would be appreciated. Thanks alot. :cap:
