Apply InputManager API to get direction

mouse is still missing.