YAHOO.util.CustomEvent |
disabledEvent
CustomEvent fired when the KeyListener is disabled
args: keyData
|
Booleam |
enabled
Boolean indicating the enabled/disabled state of the Tooltip
|
YAHOO.util.CustomEvent |
enabledEvent
CustomEvent fired when the KeyListener is enabled
args: keyData
|
Object |
KEYDOWN
Constant representing the DOM "keydown" event.
|
Object |
KEYUP
Constant representing the DOM "keyup" event.
|
Class YAHOO.util.KeyListener
Object | +--YAHOO.util.KeyListener
class
YAHOO.util.KeyListener
Field Summary [top]
Constructor Summary [top]
YAHOO.util.KeyListener
Copyright (c) 2006, Yahoo!
Field Detail [top]
disabledEvent
YAHOO.util.CustomEvent
disabledEvent
CustomEvent fired when the KeyListener is disabled
args: keyData
enabled
Booleam
enabled
Boolean indicating the enabled/disabled state of the Tooltip
enabledEvent
YAHOO.util.CustomEvent
enabledEvent
CustomEvent fired when the KeyListener is enabled
args: keyData
KEYDOWN
Object
KEYDOWN
Constant representing the DOM "keydown" event.
KEYUP
Object
KEYUP
Constant representing the DOM "keyup" event.
Constructor Detail [top]
YAHOO.util.KeyListener
YAHOO.util.KeyListener
()
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
KeyListener is a utility that provides an easy interface for listening for keydown/keyup events fired against DOM elements.
- Parameters:
-
attachTo
- The element or element ID to which the key event should be attached -
attachTo
- The element or element ID to which the key event should be attached -
keyData
- The object literal representing the key(s) to detect. Possible attributes are shift(boolean), alt(boolean), ctrl(boolean) and keys(either an int or an array of ints representing keycodes). -
handler
- The CustomEvent handler to fire when the key event is detected -
handler
- An object literal representing the handler. -
event
- Optional. The event (keydown or keyup) to listen for. Defaults automatically to keydown.
Method Detail [top]
disable
void
disable
()
Disables the KeyListener, by dynamically removing the key event from the appropriate DOM element.
HASH(0x1dc092c)
enable
void
enable
()
Enables the KeyListener, by dynamically attaching the key event to the appropriate DOM element.
HASH(0x1dc0a4c)
toString
string
toString
()
Returns a string representation of the object.
HASH(0x1d0402c)