The Straight Line is a modification of behavior that can be temporarily applied when using any painting tool. It allows to draw straight line more easily instead of doing it by hand.
The straight line position is computed from the viewport, this means that if between between brush strokes the camera is moved the next straight line may be wrongly positioned.
Enabling Straight Line
Simply pressing "Shift" on the keyboard when a painting tool is selected will show the dotted lines indicating the path the paint tool will follow. When "Shift" is being pressed, clicking anywhere will draw the line.
Snapping Straight Line
In addition to "Shift" it is possible to press "Ctrl" as well to snap the straight line every 5 degrees.