Class cc.KeyboardDispatcher

Class Summary
Constructor Attributes Constructor Name and Description
 
Dispatch the keyboard message

Method Summary

Class Detail

cc.KeyboardDispatcher()
Dispatch the keyboard message

Method Detail

  • addDelegate(delegate)
    add delegate to concern keyboard msg
    Parameters:
    {cc.KeyboardDelegate} delegate
    keyboard delegate object
  • {Boolean} dispatchKeyboardMSG(e, keydown)
    dispatch the keyboard message to the delegates
    Parameters:
    {event} e
    {Boolean} keydown
    whether this is a keydown or keyup
    Returns:
    {Boolean}
  • forceAddDelegate(delegate)
    force add the delegate
    Parameters:
    {cc.KeyboardDelegate} delegate
  • forceRemoveDelegate(delegate)
    force remove the delegate
    Parameters:
    {cc.KeyboardDelegate} delegate
  • <static> {cc.keyboardDispatcher} cc.KeyboardDispatcher.getInstance()
    Returns the shared cc.KeyboardDispatcher object for the system.
    Returns:
    {cc.keyboardDispatcher}
  • <static> cc.KeyboardDispatcher.purgeSharedDispatcher()
    Release the shared cc.KeyboardDispatcher object from the system.
  • removeDelegate(delegate)
    remove the delegate from the delegates who concern keyboard msg
    Parameters:
    {cc.KeyboardDelegate} delegate