only move player when key is pressed