I found that the keypress event (tpt.register_keypress) is triggered twice, one for key down and one for key up, without any different parameter. How can I use this once? It must toggle a boolean variable, but this problem makes it to turn on then off the var.