April 2024 - This site, and Kamaelia are being updated. There is significant work needed, and PRs are welcome.

Kamaelia.UI.Pygame.KeyEvent.KeyEvent

class KeyEvent(Axon.Component.component)

KeyEvent([allkeys][,key_events][,outboxes]) -> new KeyEvent component.

Component that sends out messages in response to pygame keypress events.

Keyword arguments: - allkeys -- if True, all keystrokes send messages out of "allkeys" outbox (default=False) - key_events -- dict mapping pygame keycodes to (msg,"outboxname") pairs (default=None) - outboxes -- dict of "outboxname":"description" key:value pairs (default={})

Inboxes

Outboxes

Methods defined here

Warning!

__init__(self, allkeys, key_events, outboxes)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

main(self)

Main loop.

waitBox(self, boxname)

Generator. yields 1 until data is ready on the named inbox.


Feedback

Got a problem with the documentation? Something unclear, could be clearer? Want to help with improving? Constructive criticism, preferably in the form of suggested rewording is very welcome.

Please leave the feedback here, in reply to the documentation thread in the Kamaelia blog.