All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.sun.java.swing.KeyStroke
KeyStroke objects are used to define high-level (semantic) action events. Instead of trapping every keystroke and throwing away the ones you are not interested in, those keystrokes you care about automatically initiate actions on the components they are registered with.
KeyStroke objects handle both character-code generating keystrokes you would trap with a KeyClicked event handler and key-code generating keystrokes (like Enter or F1) that you would trap with a KeyPressed event handler.
KeyStroke objects are immutable and unique.
public static KeyStroke getKeyStroke(char keyChar)
public static KeyStroke getKeyStroke(int keyCode,
int modifiers,
boolean onKeyRelease)
public static KeyStroke getKeyStroke(int keyCode,
int modifiers)
public static KeyStroke getKeyStrokeForEvent(KeyEvent anEvent)
public static KeyStroke getKeyStroke(String representation)
public char getKeyChar()
public int getKeyCode()
public int getModifiers()
public boolean isOnKeyRelease()
public int hashCode()
public boolean equals(Object anObject)
All Packages Class Hierarchy This Package Previous Next Index