Use arrow keys or WASD keys to move the cursor.
Source code available at https://github.com/webcoding123/2d-cursor-movements