Package org.tn5250j.keyboard
Class KeyStroker
- java.lang.Object
-
- org.tn5250j.keyboard.KeyStroker
-
public class KeyStroker extends java.lang.ObjectThis class is basically a wrapper for KeyEvent that is used internally to the project instead of KeyEvents. Uses getKeyLocation for 1.4 and greater.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringaltSuffixstatic intKEY_LOCATION_LEFTA constant indicating that the key pressed or released is in the left key location (there is more than one possible location for this key).static intKEY_LOCATION_NUMPADA constant indicating that the key event originated on the numeric keypad or with a virtual key corresponding to the numeric keypad.static intKEY_LOCATION_RIGHTA constant indicating that the key pressed or released is in the right key location (there is more than one possible location for this key).static intKEY_LOCATION_STANDARDA constant indicating that the key pressed or released is not distinguished as the left or right version of a key, and did not originate on the numeric keypad (or did not originate with a virtual key corresponding to the numeric keypad).static intKEY_LOCATION_UNKNOWNA constant indicating that the keyLocation is indeterminate or not relevant.protected intlocation
-
Constructor Summary
Constructors Constructor Description KeyStroker(int keyCode, boolean isShiftDown, boolean isControlDown, boolean isAltDown, boolean isAltGrDown, int location)KeyStroker(java.awt.event.KeyEvent ke)KeyStroker(java.awt.event.KeyEvent ke, boolean isAltGrDown)
-
Method Summary
Modifier and Type Method Description booleanequals(java.awt.event.KeyEvent ke)booleanequals(java.awt.event.KeyEvent ke, boolean altGrDown)booleanequals(java.lang.Object obj)booleanequals(java.lang.Object obj, boolean altGrDown)intgetKeyCode()java.lang.StringgetKeyStrokeDesc()intgetLocation()inthashCode()booleanisAltDown()booleanisAltGrDown()booleanisControlDown()booleanisShiftDown()voidsetAttributes(java.awt.event.KeyEvent ke, boolean isAltGr)java.lang.StringtoString()
-
-
-
Field Detail
-
location
protected int location
-
altSuffix
public static final java.lang.String altSuffix
- See Also:
- Constant Field Values
-
KEY_LOCATION_UNKNOWN
public static final int KEY_LOCATION_UNKNOWN
A constant indicating that the keyLocation is indeterminate or not relevant. KEY_TYPED events do not have a keyLocation; this value is used instead.- Since:
- 1.4
- See Also:
- Constant Field Values
-
KEY_LOCATION_STANDARD
public static final int KEY_LOCATION_STANDARD
A constant indicating that the key pressed or released is not distinguished as the left or right version of a key, and did not originate on the numeric keypad (or did not originate with a virtual key corresponding to the numeric keypad).- Since:
- 1.4
- See Also:
- Constant Field Values
-
KEY_LOCATION_LEFT
public static final int KEY_LOCATION_LEFT
A constant indicating that the key pressed or released is in the left key location (there is more than one possible location for this key). Example: the left shift key.- Since:
- 1.4
- See Also:
- Constant Field Values
-
KEY_LOCATION_RIGHT
public static final int KEY_LOCATION_RIGHT
A constant indicating that the key pressed or released is in the right key location (there is more than one possible location for this key). Example: the right shift key.- Since:
- 1.4
- See Also:
- Constant Field Values
-
KEY_LOCATION_NUMPAD
public static final int KEY_LOCATION_NUMPAD
A constant indicating that the key event originated on the numeric keypad or with a virtual key corresponding to the numeric keypad.- Since:
- 1.4
- See Also:
- Constant Field Values
-
-
Method Detail
-
setAttributes
public void setAttributes(java.awt.event.KeyEvent ke, boolean isAltGr)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
isShiftDown
public boolean isShiftDown()
-
isControlDown
public boolean isControlDown()
-
isAltDown
public boolean isAltDown()
-
isAltGrDown
public boolean isAltGrDown()
-
getLocation
public int getLocation()
-
equals
public boolean equals(java.awt.event.KeyEvent ke)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
equals
public boolean equals(java.awt.event.KeyEvent ke, boolean altGrDown)
-
equals
public boolean equals(java.lang.Object obj, boolean altGrDown)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getKeyStrokeDesc
public java.lang.String getKeyStrokeDesc()
-
getKeyCode
public int getKeyCode()
-
-