From Xojo Documentation


System.PenType() As Integer

Supported on Desktop (Mac).

Returns an Integer that describes the type of pen being used (macOS only).


It is meaningful only if a graphics tablet is connected. You can use the following class constants to determine the pen type:

Class Constant Description
PenTypeNone Mouse (no graphics tablet connected)
PenTypeTip Tip end of pen device
PenTypeEraser Eraser end of pen device