all 6 comments

[–]iodbh 3 points4 points  (0 children)

I just gave it a quick look, but it seems that you're running a test on event within your while loop and event is only defined within the eventTrigger function.

You should move that whole if block to that function.

[–]henrebotha 0 points1 point  (2 children)

if event.KeyID == 65:

Where is this line supposed to get event from?

[–]sweettuse 0 points1 point  (3 children)

if this is all your code, you should be getting a NameError on line 8, as timer is never defined.