added map mouse and keyboard input.