System.PenButtonPushed

From Xojo Documentation

Method

System.PenButtonPushed(index As Integer) As Boolean

Supported on Desktop (Mac).

Returns a Boolean indicating whether the button passed as Index is currently pushed (macOS only).