void (KeyEvent e) { if (!ClientId.isCurrentlyUnderLocalId()) { return; } final int keyCode = e.getKeyCode(); if (keyCode == KeyEvent.VK_SHIFT) { myShiftPressed = e.getID() == KeyEvent.KEY_PRESSED; onModifiersChanged(); } if (keyCode == KeyEvent.VK_CONTROL) { myCtrlPressed = e.getID() == KeyEvent.KEY_PRESSED; onModifiersChanged(); } if (keyCode == KeyEvent.VK_ALT) { myAltPressed = e.getID() == KeyEvent.KEY_PRESSED; onModifiersChanged(); } }