A Microsoft platform for building and publishing apps for Windows devices.
Hi,
Welcome to Microsoft Q&A!
Yes. Currently, there is no perfect solution to this issue.
As this link says, uwp app goes in suspended state when they are not focused. You can solve this by requesting "ExtendedExecutionSession" which will guarantee that your app never falls asleep when out of focus if "attached to wallpower".
Uwp can’t detect input without focus. CoreWindow.GetAsyncKeyState() works only when the Windows is focused. You can refer to the method mentioned in the answer to register F key as hotkey, but it is difficult to listen to lots of hot keys.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.