Overview | Methods | Fields | This Package | All Packages

OverviewMethodsFieldsThis PackageAll Packages

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.