UrhoSharp example app from UrhoSharp template for Visual Studio should exit when ESC
key is pressed:
Input.SubscribeToKeyDown(args => { if (args.Key == Key.Esc) Exit(); });
However, it seems that it does not.
I have found that I need to click the app window first and then press ESC
.
The problem seems to be caused that the app window doesn't have a focus when the app starts. (App's console window has focus when app starts.)
How to give focus to the app window in UrhoSharp?