Main Page | Packages | Class Tree | Index | Help

xp.events

class KeyListener

Object
  |
  +--xp.events.KeyListener


class KeyListener
extends Object

KeyListener Listens for key events and callsback to keyUp(code) or keyDown(code) methods in the parent


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public
isKeyPressed: Boolean
is key currently pressed

public
isRepeat: Boolean
is the last key press a repeat

public static
keyListener
Our singleton

public
lastKey: Number
code of last key pressed

Constructor

public
KeyListener ( )
Constructor

Method Summary

public
attach ( target )
Attach the listener to a component and activate

public
detach ( target )
Detach from a component and stop listening

public
grab ( target )
Temporarily Attach the listener to another component and activate

public
release ( target )
Detach from a component and restore back to ols parent



Field Documentation

isKeyPressed

public var isKeyPressed: Boolean
is key currently pressed

isRepeat

public var isRepeat: Boolean
is the last key press a repeat

keyListener

public static var keyListener
Our singleton

lastKey

public var lastKey: Number
code of last key pressed


Constructor Documentation

KeyListener

public function KeyListener()
Constructor


Method Documentation

attach

public function attach(target)
Attach the listener to a component and activate

Parameters:
target
the component to attach to.

detach

public function detach(target)
Detach from a component and stop listening

Parameters:
target
the component to detach from

grab

public function grab(target)
Temporarily Attach the listener to another component and activate

Parameters:
target
the component to attach to.

release

public function release(target)
Detach from a component and restore back to ols parent

Parameters:
target
the component to detach from

The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc