Click and drag the cursor slowly in the desired direction.
Hold Shift.
The line continues horizontal, vertical, or at a 45-degree angle, whichever is closest to the direction of cursor movement. If the direction is not what you intended, click
(Undo) and start again.