I used that at one point (I took a break from active development so apologies if my memory is incorrect):
I had a script that would trigger when LMB was pressed. In my script I checked the cursor.target type and then ran code from there.
Ex:
$targtocheck = cursor.target;
if $targtocheck.type == CHARACTER then
print("CLICKED ON CHAR");
else
print("DID NOT CLICK CHAR");
end;
I would have to double check my use cases but I hope this is a good starting point.