"PV ON EVENT" is a 4D View command is used to link a method to a 4D View event.
PV ON EVENT (area; event; method)
Every time the event occurs, the method is called. The called method receives 6 Longint parameters and returns a Boolean in $0:
$1: The 4D View area reference
$2: The event
$3: Key modification code
$4: The column number (*)
$5: The row number (**)
$6: Ascii code of the key (if the event is a click, a right click or a double click, $6 is set to 0)
If you plan to compile your database, you must remember to declare all variables including $0 as a Boolean, otherwise you'll get unexpected runtime errors.
For more information, please take a look at: https://www.4d.fr/4DDoc68/CMU/CMU15994.HTM