@Override public void keyPressed(KeyEvent key) { if (key.isControlDown()) { if (key.getKeyCode() == KeyEvent.VK_R) { recording = !recording; return; } if (key.getKeyCode() == KeyEvent.VK_S) { screenshot = true; return; } } Keys.keySet(key.getKeyCode(), true); }
@Override public void keyReleased(KeyEvent key) { Keys.keySet(key.getKeyCode(), false); }