Typically, for every viewer, there is an associated controller that handles keyboard and mouse activity during the time that the corresponding viewer is the one associated with the active window.