Determine the state of standard buttons

Is there a way to determine if a button display is on or off?
I’m actually trying to determine if I am in INSERT mode or not, and the ADD button would indicate that. If there is another way to determine that, I would like to know both answers. Thanks.

Afaik there are no events to put your code in. Not an ‘onclick’ or something similar. Actually I wouldn’t know how to do that either. OnBeforeInsert is just an event triggerd just before the dbaccess and not after hitting the insert button. So I fear there’s no solutions for this.