Key.isToggled()
Top  Previous  Next


SWiSH Player Support
SWF5 or later

Syntax
Key.isToggled(keycode)

Arguments
keycode (do not confuse with ascii code, although the two are the same for most ascii keys a..z etc.)
Either Key.CAPSLOCK (20) or 144 (Num Lock). Num Lock is not available on Macintosh.

Returns
The status of the toggling keys.

Description
Method: Returns true if the toggling key is on or selected.


Sample
onEnterFrame() {
   // _root.ret.text is a dynamic text element. 
   // this displays the toggled status (rather than the key press status) of the CAPSLOCK key
   _root.ret.text = Key.isToggled(Key.CAPSLOCK);
}