When the controller's button dialog wants the user to press a button, it creates a button mapper for the controller it belongs to.
It then waits for an event. When the event arrives, the dialog tells its button mapper to map the event to the controller feature being mapped.