Package pygsear :: Module Event :: Class KEYDOWN_Event
[show private | hide private]
[frames | no frames]

Class KEYDOWN_Event

object --+            
         |            
    Sprite --+        
             |        
         Event --+    
                 |    
         KEY_Event --+
                     |
                    KEYDOWN_Event


Method Summary
  __init__(self, key, callback, **kwargs)
Initialize a KEYDOWN event.
a new object with type S, a subtype of T __new__(S, ...)
  __repr__(self)
(inherited from Sprite)
  add(self, group)
Add this Event to an EventGroup. (inherited from Event)
  add_internal(self, group)
(inherited from Sprite)
  alive(self)
alive() -> bool ask the life of a sprite (inherited from Sprite)
  call(self, pygame_event, **kwargs)
Perform the callback, if the event is enabled, and the key pressed is the right key. (inherited from KEY_Event)
  check_holding(self, ev, **kwargs)
(inherited from KEY_Event)
  disable(self)
Do not allow callbacks to go through. (inherited from Event)
  enable(self)
Allow callbacks to go through. (inherited from Event)
  groups(self)
groups() -> list list used sprite containers (inherited from Sprite)
  kill(self)
kill() end life of sprite, remove from all groups (inherited from Sprite)
  nop(self, ev, **kwargs)
Do nothing. (inherited from Event)
  press(self, ev, **kwargs)
(inherited from KEY_Event)
  release(self, ev, **kwargs)
(inherited from KEY_Event)
  remove(self, group)
remove(group) remove a sprite from container (inherited from Sprite)
  remove_internal(self, group)
(inherited from Sprite)
  update(self, *args)
(inherited from Sprite)

Method Details

__init__(self, key=None, callback=None, **kwargs)
(Constructor)

Initialize a KEYDOWN event.

The KEYDOWN is generated when the key is first pressed. Any key can generate a KEYDOWN event, it has nothing in particular to do with the up and down arrows on the keyboard.
Parameters:
key - The keyboard key which will trigger this event, or a sequence of keys. (ie: Pressing any one of these keys will trigger the event) If key is None then any keypress will fire the callback.
callback - Function or method to call when the event occurs.
kwargs - Additional parameters that should be passed on to the callback.

__new__(S, ...)

Returns:
a new object with type S, a subtype of T

Generated by Epydoc 1.1 on Sun Jan 25 19:10:13 2004 http://epydoc.sf.net