August'24: Kamaelia is in maintenance mode and will recieve periodic updates, about twice a year, primarily targeted around Python 3 and ecosystem compatibility. PRs are always welcome. Latest Release: 1.14.32 (2024/3/24)

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.