Class YAHOO.util.KeyListener

Object
   |
   +--YAHOO.util.KeyListener

class YAHOO.util.KeyListener

Field Summary [top]

YAHOO.util.CustomEvent disabledEvent
CustomEvent fired when the KeyListener is disabled args: keyData 
Object enabled
 
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. 

Constructor Summary [top]

YAHOO.util.KeyListener
Copyright (c) 2006, Yahoo! 

Method Summary [top]

void disable ()
Disables the KeyListener, by dynamically removing the key event from the appropriate DOM element. 
void enable ()
Enables the KeyListener, by dynamically attaching the key event to the appropriate DOM element. 

Field Detail [top]

disabledEvent

YAHOO.util.CustomEvent   disabledEvent
CustomEvent fired when the KeyListener is disabled args: keyData

enabled

Object   enabled

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
Parameters:
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 OR
handler - An object literal representing the handler.
event - Optional. The event (keydown or keyup) to listen for. Defaults automatically to keydown.
HASH(0x1ca5a18)

Method Detail [top]

disable

void disable ()
Disables the KeyListener, by dynamically removing the key event from the appropriate DOM element. HASH(0x1d985fc)

enable

void enable ()
Enables the KeyListener, by dynamically attaching the key event to the appropriate DOM element. HASH(0x1d9871c)