This javacode make your capslock,numlock and scroll-lock on, and using infinite loop you can make it to behave like virus. That will continuously make your locks on off.
Go with this code
Go with this code
- /*Code by http://www.javacup.co.in
- * Ashish Awasthi
- * */
- package practiceJava;
- import java.awt.Toolkit;
- import java.awt.event.KeyEvent;
- public class LockOn {
- //This code show you how to on Capslock,Numlock and ScrollLock using JavaCode
- //Using this you can also use many other keys of Keyboard in Java
- public boolean capsLock(boolean cp) {
- return true;
- }
- public boolean numLock(boolean np) {
- return true;
- }
- public boolean scrollLock(boolean sp) {
- return true;
- }
- //This method on all three buttons
- public boolean onAllKeys() {
- return capsLock(true) & numLock(true) & scrollLock(true);
- }
- //This method off all three buttons
- public boolean offAllKeys() {
- return capsLock(false) & numLock(false) & scrollLock(false);
- }
- LockOn lc = new LockOn();
- //this is an infinite loop that will make all 3 buttons contineous on-off
- int i = 0;
- while (i < 1) {
- lc.onAllKeys();
- lc.offAllKeys();
- }
- }
- }
great
ReplyDelete