def on_event(self, event):
if self.state > <NUM_LIT:0>:<EOL><INDENT>if event.type == MOUSEBUTTONDOWN:<EOL><INDENT>key = self.layout.get_key_at(pygame.mouse.get_pos())<EOL>if key is not None:<EOL><INDENT>self.on_key_down(key)<EOL><DEDENT><DEDENT>elif event.type == MOUSEBUTTONUP:<EOL><INDENT>self.on_key_up()<EOL><DEDENT>elif event.type == KEYDOWN:<EOL><INDENT>value = pygame.key.name(event.key)<EOL><DEDENT>elif event.type == KEYUP:<EOL><INDENT>value = pygame.key.name(event.key)<EOL><DEDENT><DEDENT>
Pygame event processing callback method.

        :param event: Event to process.