Tracking keypress events on an add on

Marlon Brandão de Sousa

As the message subject says, I need to track keypress events on an ad on. Basically I need a function to be called whenever any key is pressed and take some decisions depending on what key it is. How can I achieve these in NVDA?

Since we are on this topic, is there any centralized place where I can find all events that mvda is capable of producing?