Door Courtesy Switch Circuit: Description
WARNING: This page is about a different car, the 2011 Toyota Corolla. However, it is still accessible from the selected car via links, so may be relevant.
When an additional transponder key is registered, the transponder key ECU assembly detects the front door courtesy light switch open/close condition, and enters the key registration mode.