If the code that triggers the event is code that you wrote, then a Boolean would certainly work. The code could set the Boolean, but a user would not, so if the Boolean is set, then your code did it. If the Boolean is not set, then the user did it.