Class Index | File Index

Classes


Class zwt.event.KeyboardEvent


Extends zwt.event.UIEvent.

A keyboard event object is emitted when a keyboard event occurs.


Defined in: KeyboardEvent.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
zwt.event.KeyboardEvent(event, zwt_ui_Widget_widget, int_type)
Construct a keyboard event.
Field Summary
Field Attributes Field Name and Description
<static>  
zwt.event.KeyboardEvent.KEY_DOWN
Constant used to indicate a key down event
<static>  
zwt.event.KeyboardEvent.KEY_PRESS
Constant used to indicate a key press event
<static>  
zwt.event.KeyboardEvent.KEY_UP
Constant used to indicate a key up event
Method Summary
Method Attributes Method Name and Description
 
Return the key code.
 
Return true if the Alt key was pressed when the event occurs.
 
Return true if the Ctrl key was pressed when the event occurs.
 
Return true if the Meta key was pressed when the event occurs.
 
Return true if the Shift key was pressed when the event occurs.
Methods borrowed from class zwt.event.UIEvent:
getBrowserEvent, getBrowserEventTarget, getReturn, getWidget, setReturn
Methods borrowed from class zwt.event.Event:
getType, isCancelBubble, setCancelBubble, touch
Class Detail
zwt.event.KeyboardEvent(event, zwt_ui_Widget_widget, int_type)
Construct a keyboard event.
Author: Jeremy KUHN.
Parameters:
{Event} event
The javaScript event object
{zwt.ui.Widget} zwt_ui_Widget_widget
The widget linked to the event
{Integer} int_type
The event type
Field Detail
<static> {Integer} zwt.event.KeyboardEvent.KEY_DOWN
Constant used to indicate a key down event

<static> {Integer} zwt.event.KeyboardEvent.KEY_PRESS
Constant used to indicate a key press event

<static> {Integer} zwt.event.KeyboardEvent.KEY_UP
Constant used to indicate a key up event
Method Detail
{Integer} getKey()
Return the key code.
Returns:
The key code

{Boolean} isAlt()
Return true if the Alt key was pressed when the event occurs.
Returns:
true if Alt was pressed

{Boolean} isCtrl()
Return true if the Ctrl key was pressed when the event occurs.
Returns:
true if Ctrl was pressed

{Boolean} isMeta()
Return true if the Meta key was pressed when the event occurs.
Returns:
true if Meta was pressed

{Boolean} isShift()
Return true if the Shift key was pressed when the event occurs.
Returns:
true if Shift was pressed

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jan 12 2012 02:07:52 GMT+0100 (CET)