I am trying to write an addon that does a thing when NVDA starts up. I want it do something else when NVDA shuts down. I have written a basic addon that uses input gestures to do my things... but are there event handlers or some other mechanism that I can use to tie into so I can do my things on NVDA startup/shutdown?
The answer is yes.
https://github.com/nvdaaddons/DevGuide/wiki/NVDA-Add-on-Development-Guide#other-components
For GlobalPlugins, a constructor like so can be used for startup:
def __init__(self):
super(GlobalPlugin, self).__init__()
# DO STUFF
And a terminate() for shutdown:
def terminate(self):
# DO STUFF