If you want to know from the UI(User Interface) and the SO in printed from View Mode:
- Create a Custom HTML Field and inject a JavaScript function with an event Listener to know when the button is clicked.
OR
- Create a BeforeLoad UserEvent script which is going to this very same thing dynamically, meaning creating/attaching the field to to the form with the script code...