There's about half a dozen mouse events, but we'll look at just three of them:
- The mousemove event, which occurs every time the mouse is moved, and tells you it's new coordinates.
- The mousedown event, which occurs every time a mouse button is clicked, and tells you it's coordinates as well as which mouse button was clicked.
- The mouseup event, which occurs every time a mouse button is released, and tells you which mouse button was released.
You receive mousemove events even if none of the mouse buttons are down.