0

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.

SDIDSA
  • 894
  • 10
  • 19
  • 2
    In my opinion there's no easy and perfect way of doing it. You may get some ideas reading this [question](https://stackoverflow.com/questions/3650565/disable-screenshot-of-my-swing-window) – fabfas Jan 18 '20 at 16:56
  • the thread has some inspiring ideas, I thought I checked every SO thread about this matter but I missed that, thanks for the link. – SDIDSA Jan 18 '20 at 17:05
  • well for me, the whole "block PrintScreen key" feature seems pointless as the data displayed on the screen can be stolen or copied in ways that I can never prevent, but at least I can try to make it harder for you to do it, and make my client happy along the way – SDIDSA Jan 18 '20 at 17:12

0 Answers0