Environment
- ASP.NET Core Application with Kestrel hosted as Windows Service using .Net Core 2.2
- Angualar Application which is delivered through the ASP.NET application
- Web API for communicating between the ASP.NET and Angular application
- Everything is running on one Windows PC. The Angular application will always be only available on localhost
Use Case
A user makes a screenshot of a WPF application also running on the same PC using the print key. The ASP.NET application needs now a trigger, that a screenshot was made so it can be send to the angular application.
Solution approach
I thought that I would just listen with a global hook for the print key and then get the image from the clipboard. I've tried using the low level Windows API and different Nuget packages (for example this one). Either nothing happened or the application froze.
Question
Is there a way listening globally for the key press of the print key in .Net Core 2.2 application or is there another approach I can listen for new screenshots made by the user?