Constants that specify buttons on a one, two, or three-button mouse.


typedef enum CGMouseButton : uint32_t {
} CGMouseButton;


Quartz supports up to 32 mouse buttons. The first three buttons are specified using these three constants. Additional buttons are specified in USB order using the integers 3 to 31.

These constants are used:

  • In the function CGEventCreateMouseEvent to specify the button that’s changing state.

  • In the function CGEventSourceButtonState to specify the button that’s being tested.

  • To specify the value of the kCGMouseEventButtonNumber event field when modifying an event.