Use the Arrow keys to avoid the red, and capture the key. Proceed to the green door.
Based on YouTube tutorial by Surfing Scratcher. I modified it slightly.