iOS app running on MAC os Big Sur and keyboard events

I wanted to make my games available on MAC OS. So instead of creating an official MAC app, I wanted to use the new feature available from Big Sur allowing you to basically run any iOS APP on a MAC without any work. (or at least less work)

While this is fun in theory, in reality, the game still requires some kind of work to make sense on a MAC. So I basically used the same logic I used for the PC version with enabling keyboard shortcuts and movement (AWSD, Space, Enter etc). I can easily detect if the iOS game is running on a MAC to enable different interface and logic etc.

The problem is: There are no keyboard events fired. Nor mouse scrolling or “right click”. As if the code was doing nothing on iOS (I assume because iOS normally do not have a physical keyboard).

Anyone has an idea how to enable physical keyboard events ?


Event Dispatch - Keyboard events docs might help.

@slackmoehrle My problem is not with implementing the keyboard events, that has been done months ago. My games are already being sold on STEAM. Problem is that when trying to run the ios APP on a M1 chip Big sur OS, the events are not fired. (At least when running it through XCode and using target “My Mac (Designed for iPad)”. Haven’t tried yet with the real app from the app store

Oh. I gotcha. I have a text adventure game that is running fine on Big Sur. Have you tried cpp-tests?