Package | cc.cote.feathers.softkeyboard |
Class | public class KeyEvent |
Inheritance | KeyEvent ![]() |
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
Property | Defined 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 |
Method | Defined 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 |
Constant | Defined 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 |
char | property |
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
.
public function get char():String
charCode | property |
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.
public function get charCode():uint
See also
KeyEvent | () | Constructor |
public function KeyEvent(type:String, charCode:uint, char:String = null, data:Object = null)
Creates a new SoftKeyboardEvent
object.
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
|
toString | () | method |
override public function toString():String
Returns a textual description of the event (useful in debugging situations).
ReturnsString |
KEY_DOWN | Constant |
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_UP | Constant |
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_VARIANTS | Constant |
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.