Shouldn't matter if the key is on or not, as long as the senor is not moving for 20 minutes. That is how long the sensor takes to switch from "park mode" to "30 block mode" so it can initiate the learning sequence.