nthStylusButton function

int nthStylusButton (int number)

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

The number argument can be at most 62.

See kPrimaryStylusButton and kSecondaryStylusButton for semantic names for some stylus buttons.

Implementation

int nthStylusButton(int number) => (kPrimaryStylusButton << (number - 1)) & kMaxUnsignedSMI;