Moving points along an axis

Using some keys of the keyboard, you can constrain points to move along the direction of an axis. Proceed as follows: