Hey. I am trying to make a "virus" that will not let the user exit the program even with pressing Command+Q (oh, ya, I have an Apple). Here is what I have so far:

if (keylistener.getKeyCode()==81){
System.out.println("Works");
}
I have the println just to see if it works (which it does), but is there a way to "kill" the request or have the computer not recognize the command key if pressed?

Thanks in advance!

Recommended Answers

And why would you want to create a virus?

Jump to Post

All 2 Replies

And why would you want to create a virus?

Obviously beginner and just having silly ideas. Java wasn't design for what you want it to do.
End of story
Thread closed

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.