MrStahlfelge / lightblocks

Falling Lightblocks. Falling block game for Android (Mobile and TV), iOS, Web browsers. Works on desktops, too.
https://www.golfgl.de/lightblocks/
Other
148 stars 16 forks source link

iOS keyboard support #5

Closed MrStahlfelge closed 4 years ago

MrStahlfelge commented 4 years ago

Since iOS 13.5, Apple supports apps to get all keyboard events. Lightblocks should handle these events like on other platforms.

Attention: iCade support and relies on some fake key presses, needs to be checked when the change is made.

MrStahlfelge commented 4 years ago

13 needs to be fixed first. The iCade controller emulation adds a controller on certain key events.

After #13 is resolved, supporting iCade and hardware keyboards can be done the following way: All iCade buttons (ICadeController.KEYS_TO_HANDLE) will be suppresed for hardware keyboard events. This can be done by overriding DefaultIosInput.getGdxKeyCode() and returning UNKNOWN for all these keys.

MrStahlfelge commented 4 years ago

Last referenced commit is wrong here, it relates to #4