What would be the best way for a plugin to know when the user presses or releases his PTT Key? And by that I really mean the PTT Key, not just the talking flag.

Some background: My soundboard plugin sets the talk state to continous transmission when the users plays a sound. If he then uses the PTT Key while a sound is playing, Teamspeak resets the talk state to PTT and the transmission stops as soon as the user releases the ptt key. I need to reset the talk state to continous transmission when the ptt key is released while a sound is playing.