We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
I have an installation that only "verified" people can use the computer, however, they tend to close the sketch when nobody's watching to go on Facebook or whatever... (yeah, I know...)
So, I would like to know if there's a way to completely disable any possibility of the sketch closing, with ALT+F4, or CTRL+D, etc...
I've managed to disable the ESC key, by setting key=0, however, that doesn't work to other keys like ALT or CTRL, at least not when combined with other keys.
Well, I think I explained well. Hope there's somebody that already had the same necessity...
Thanks in advanced! (:
Answers
It seems to me that that wouldn't be possible... the ESC key is probably coded by processing, while ALT+F4 is probably coded by the OS. So you would have to change the code in the OS and make an exception there. But that's just me guessing.
There's another tip. Java has a Robot class that is used to simulate input and it has keyRealese method that simulates the realease of a key. You can try to constantly call this method to release alt and(or?) F4, so OS neve get a signal from both of these.
some OS like iPads offer a kiosk mode where you can tell it to run only your program iirc
https://forum.Processing.org/two/discussion/comment/62435/#Comment_62435