My client insists that as long as his java app is running, the PrintScreen functionality has to be disabled, note that the app has to be cross-platform, the approaches I have tried for blocking PrintScreen were
- detecting the key events from the JavaFX app which I had no luck with as the PrintScreen key triggers no events that can be handled from JavaFX.
- for Windows, I have tried editing the registry through cmd commands but the changes require a logout/login to take effect.
- for Linux, I have tried backing up the gnome-screenshot file under /usr/bin and restoring it before the app closes, all using terminal commands, but the commands require sudo privileges, which I dealt with by prompting for the user's password which I don't think is very fancy.
I'm very open to suggestions so if you have any idea that you think might help please don't hesitate to share.
Note: the app I'm developing won't run on a VM, and it will also detect and kill suspicious processes such as third party screen capturing utilities, which means all I have left to do is disable the print screen key.