template for keyboard input and player movement