Hello,
Welcome to our Microsoft Q&A platform!
For UWP applications, Pointer events can only be captured when the application is running in the foreground and the cursor is moved in the application.
There is currently no API in UWP to capture pointer events outside the app.
Thanks.