Microsoft SDK for Java

KeyEvent.getModifiers

Retrieves a value indicating which, if any, of the CTRL, SHIFT, and ALT keys were pressed when the event occurred.

Syntax

public int getModifiers()

Return Value

Returns an integer that indicates which modifier keys were pressed.

Remarks

To determine whether a specific modifier key was pressed when a key event occurred, use the getAlt, getControl, or getShift method.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.