1,105,197 Community Members

Kill key code??

Member Avatar
caswimmer2011
Light Poster
33 posts since Oct 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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!

Member Avatar
zeroliken
Nearly a Posting Virtuoso
1,222 posts since Nov 2011
Reputation Points: 79 [?]
Q&As Helped to Solve: 216 [?]
Skill Endorsements: 15 [?]
 
0
 

And why would you want to create a virus?

Member Avatar
peter_budo
Code tags enforcer
7,934 posts since Dec 2004
Reputation Points: 2,502 [?]
Q&As Helped to Solve: 1,028 [?]
Skill Endorsements: 66 [?]
Moderator
Featured
 
0
 

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

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: