Basically, I’ve got a input handling that detects the Ctrl down/up events. Now I’m using a screen capture application to record my sessions and the command to stop recording is Ctrl+F10. When I stop recording, the application automatically comes to the foreground and takes focus from Corona.
When I switch back to my Corona session, the game behaves as though Ctrl is still pressed because it never received the key up event, which was received by the video recording software instead when it stole focus.
What I would like to do instead is detect when the entire window has lost focus, for example the user switching apps, and manually set these keys as released. Is this possible?
I did read that I can detect application events here (https://docs.coronalabs.com/api/event/system/type.html) and resume/suspend will be useful for mobile devices that support keyboards, as I imagine that they would fire an event if the user switches apps, but I need this for Windows/Mac support.
Thanks for reading!