Console and mouse events are covered in part 5 of my console tutorial.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.