Using Photoshop generally means using a brush at some point, and not just for painting. Several tools within Photoshop also use a brush – Eraser, Dodge, Burn, etc. Here are some useful shortcuts when using a tool that uses brushes…
Click, let go and shift – click elsewhere in your document and you will get a straight line
Click and hold with your mouse button, then hold the shift key, and then move your mouse – you will be constrained to horizontal/vertical lines.