Just in case you didn’t know, the Eraser tool (E) is just a brush with a fixed shape. The same is true with tools such as Dodge and Burn; they all work like brushes. So this tip applies to all brushes. Sometimes you want to draw, paint, or erase in a perfectly straight line. Click where you want the line to start, hold down the Shift key, and click where you want the line to end. A straight line will be created between the two points.
This tip previously appeared in Colin Smith’s Photoshop Tips column, in the August, 2018 issue of Photoshop User magazine.