input.py
This is a wrapper class to simplify control handling in pygame when using multiple controller methods.
Beerman
(beerman)
Rather than your game logic having to deal with all the controllers directly, it allows you to define named controls which can map to multiple controllers at once.
Simple example:
input = Input() while running: input.Poll() ship.x += input.GetControl('THRUST') ship.y += input.GetControl('CLIMB') if input.GetControl('FIRE') ship.fire() if input.GetControl('QUIT'): running = False render()