ppizarror / pygame-menu

A menu for pygame. Simple, and easy to use
https://pygame-menu.readthedocs.io/
Other
555 stars 141 forks source link

Make keyboard_ignore_nonphysical configurable #428

Closed asztalosdani closed 1 year ago

asztalosdani commented 1 year ago

Is your feature request related to a problem? Please describe. I have a raspberry pi with a pitft from Adafruit. The recent raspbian versions (since jessie...) broke pygame's compatibility with touchscreens to a point where it returns either random positions, or the axis is flipped. But there are a few buttons on the pitft board, which I can use to emulate KEYDOWN events. I did it only to find out self._keyboard_ignore_nonphysical = True in menu.py. Setting it to False solves this.

Describe the solution you'd like Please make the _keyboard_ignore_nonphysical configurable.

ppizarror commented 1 year ago

Hi! The latest version (4.3.0) supports this feature, see https://github.com/ppizarror/pygame-menu/blob/master/pygame_menu/menu.py#L89

I think I'll upload this version right now

ppizarror commented 1 year ago

Done, see https://pypi.org/project/pygame-menu/ Updated docs, https://pygame-menu.readthedocs.io/en/4.3.0/