Robot and KeyListener

61 Views Asked by At

(Sorry for bad English) Robot doesn't perform it's task after pressing a key, here's my code:

public void keyPressed (KeyEvent e) {
     if(e.getKeyCode() == KeyEvent.VK_Z) {
      r.keyPress(KeyEvent.VK_X);
      r.keyRelease(KeyEvent.VK_X);
   }
}

0

There are 0 best solutions below