I want to use pygame-menu on a raspberry pi with rotary encoders. When I post up/down events from the encoder callback to pygame, it does not seem compatible. The menu does not react. The same code can post non-keyup/down events successfully. For example:
pygame.event.post(pygame.event.Event(pygame.KEYDOWN, {'unicode': '', 'key': 274, 'mod': 0, 'scancode': 108})) # no menu movement
pygame.event.post(pygame.event.Event(pygame.QUIT, {})) # works as expected
Is there a way to simulate keyboard events that can operate the menu?
pygame is at 1.9.6, pygame-menu is 4.1.6