You'd do something like: e = pygame.event.Event(pygame.KEYDOWN, {"key": pygame.K_KP_PLUS}) pygame.event.post(e) PierreLafrance1@xxxxxxxxxxxx wrote:
Hi I have a simple question : I want to create a class that generates keyboard event to test my application. Ex : I want a method to send this : event.type == KEYDOWN and event.key == K_KP_PLUS: Any pointers to help me doing this ? Thanks