From QB64 Wiki
ON PEN enables event handling for the lightpen.
- ON PEN GOSUB labelorline
- Currently NOT supported in QB64!
- Any activity on the lightpen will cause the program to branch to the specified labelorline.
- PEN ON enables or resumes event trapping.
- PEN OFF disables event trapping and event logging.
- PEN STOP temporarily suspends event trapping. When resumed again by PEN ON), may report events while suspended.