Corona Quick Thought – an “Android iPad” for Windows simulator

One of the neat “tricks” with the Windows simulator when used with an Android device is that you can listen for key events and potentially use them for taking screen shots and/or toggling various debug features.

For instance, I like to put something like this in main.lua to make taking screenshots easier:

Unfortunately, that trick won’t work with simulated iOS devices – the simulator won’t send the key events to iOS devices.

So, borrowing the technique from this post we can mimic an iOS device’s resolution, but tell the simulator it’s an Android device.

For example, here I’ve copied the skin “iPad.lua” into “Android iPad.lua”, in order to create a 4:3 aspect device that the simulator will treat as Android (and thus provide key events through the simulator).

Repeat for other iOS devices if/as desired.

Leave a Reply