Packagecc.cote.feathers.softkeyboard
Classpublic class KeyEvent
InheritanceKeyEvent Inheritance starling.events.Event

A KeyEvent object is dispatched in response to a user pressing or releasing one of the keys on a SoftKeyboard object. Please note that this object inherits properties and methods from starling.events.event. You will have to look up Starling's API documentation for those inherited elements.

See also

cc.cote.feathers.softkeyboard.SoftKeyboard
Starling API documentation


Public Properties
 PropertyDefined By
  char : String
[read-only] The actual printable character associated to the key that triggered the event.
KeyEvent
  charCode : uint
[read-only] The code of the character associated to the key that triggered the event.
KeyEvent
Public Methods
 MethodDefined By
  
KeyEvent(type:String, charCode:uint, char:String = null, data:Object = null)
Creates a new SoftKeyboardEvent object.
KeyEvent
  
toString():String
[override] Returns a textual description of the event (useful in debugging situations).
KeyEvent
Public Constants
 ConstantDefined By
  KEY_DOWN : String = cc.cote.feathers.softkeyboard.KeyEvent.keyDown
[static] The KEY_DOWN constant defines the value of the type property of a keyDown event object.
KeyEvent
  KEY_UP : String = cc.cote.feathers.softkeyboard.KeyEvent.keyUp
[static] The KEY_UP constant defines the value of the type property of a keyUp event object.
KeyEvent
  SHOW_VARIANTS : String = cc.cote.feathers.softkeyboard.KeyEvent.showVariants
[static] The SHOW_VARIANTS constant defines the value of the type property of a showVariants event object.
KeyEvent
Property Detail
charproperty
char:String  [read-only]

The actual printable character associated to the key that triggered the event. The value for non-printable characters will be null.


Implementation
    public function get char():String
charCodeproperty 
charCode:uint  [read-only]

The code of the character associated to the key that triggered the event. Many basic characters have constants defined for them in the CharCode class. For others, use Unicode as a base reference.


Implementation
    public function get charCode():uint

See also

Constructor Detail
KeyEvent()Constructor
public function KeyEvent(type:String, charCode:uint, char:String = null, data:Object = null)

Creates a new SoftKeyboardEvent object.

Parameters
type:String — Type of the event
 
charCode:uint — The code of the character associated to the key that triggered the event.
 
char:String (default = null) — The actual printable character associated to the key that triggered the event.
 
data:Object (default = null) — Arbitrary data to pass along with the event
Method Detail
toString()method
override public function toString():String

Returns a textual description of the event (useful in debugging situations).

Returns
String
Constant Detail
KEY_DOWNConstant
public static const KEY_DOWN:String = cc.cote.feathers.softkeyboard.KeyEvent.keyDown

The KEY_DOWN constant defines the value of the type property of a keyDown event object.

KEY_UPConstant 
public static const KEY_UP:String = cc.cote.feathers.softkeyboard.KeyEvent.keyUp

The KEY_UP constant defines the value of the type property of a keyUp event object.

SHOW_VARIANTSConstant 
public static const SHOW_VARIANTS:String = cc.cote.feathers.softkeyboard.KeyEvent.showVariants

The SHOW_VARIANTS constant defines the value of the type property of a showVariants event object.