Invoke button press events by function call

Simply put, I want to invoke the OnClicked and OnPressed events of an arbitrary Button without actually pressing it. Invoking them directly through a function, or indirectly by injecting a mouse click or keyboard input would be fine, but I can’t for the life of me find a way to actually do any of that. Surely that must be possible somehow?
If there’s a C+±only solution, that would be fine as well.

Hello! Why not create a custom event? What is the intent?