◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── ON Keyword ■ The ON keyword is used with various event-trapping statements to either: • Specify a trap • Enable a trap ■ The ON keyword may also be used to enable error handling. See: ◄ON ERROR Statement► ■ The following table summarizes the use of ON event statements: Specifies a Trap Type of Event Enables a Trap ════════════════ ══════════════════════ ═════════════════════════ ◄ON COM► Communications port ◄COM ON► ◄ON KEY► Keystroke ◄KEY ON► ◄ON PEN► Lightpen ◄PEN ON► ◄ON PLAY► Background-music queue ◄PLAY ON► ◄ON STRIG► Joystick trigger ◄STRIG ON► ◄ON TIMER► Timer ◄TIMER ON► ◄ON UEVENT► User-defined ◄UEVENT ON► ■ With the exception of ON KEY and KEY ON, these event statements can be used with object-specific events. See: ◄Object Events Summary► See: ◄Error/Event Trapping Summary►