An
AWTKeyStroke
represents a key action on the keyboard, or equivalent input device.
AWTKeyStroke
s can correspond to only a press or release of a particular key, just as
KEY_PRESSED
and
KEY_RELEASED
KeyEvent
s do; alternately, they can correspond to typing a specific Java character, just as
KEY_TYPED
KeyEvent
s do. In all cases,
AWTKeyStroke
s can specify modifiers (alt, shift, control, meta, altGraph, or a combination thereof) which must be present during the action for an exact match.
AWTKeyStrokes
are immutable, and are intended to be unique. Client code should never create an AWTKeyStroke
on its own, but should instead use a variant of getAWTKeyStroke
. Client use of these factory methods allows the AWTKeyStroke
implementation to cache and share instances efficiently.
@see #getAWTKeyStroke
@version 1.28, 02/06/06
@author Arnaud Weber
@author David Mendenhall
@since 1.4