Conditional action question

Hi I want to enable a certain directional velocity movement when two things occur at the same time. 1. when a key is pressed and 2. during a certain frame. I want to limit this event to those two conditions. any suggests on how I could do this.