During each iteration of the loop

Tests are made to determine if the user has pressed any of the four arrow keys. (See Listing 2)

If so, the x or y position coordinates are modified:

Pressing and holding down two arrow keys at a time does not result in diagonal motion. 

The text is capable of moving up, down, right, or left, but is not capable of moving along a diagonal.