nthMouseButton function

int nthMouseButton (int number)

The bit of PointerEvent.buttons that corresponds to the nth mouse button.

The number argument can be at most 62.

See kPrimaryMouseButton, kSecondaryMouseButton, kMiddleMouseButton, kBackMouseButton, and kForwardMouseButton for semantic names for some mouse buttons.

Implementation

int nthMouseButton(int number) => (kPrimaryMouseButton << (number - 1)) & kMaxUnsignedSMI;