Package org.sikuli.hotkey
Class Keys
java.lang.Object
org.sikuli.hotkey.Keys
public class Keys extends Object
this class implements an interface to the Java key system
as represented by java.awt.event.KeyEvent.
for the functions type() and write()
by translating key constants for special keys and plain text per character.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classKeys.Modifier -
Field Summary
Fields Modifier and Type Field Description static StringADDstatic StringALTstatic StringALTGRstatic StringBACKSPACEstatic charC_ADDstatic charC_ALTstatic charC_ALTGRstatic charC_CAPS_LOCKstatic charC_CMDstatic charC_CONTEXTstatic charC_CTRLstatic charC_DECIMALstatic charC_DELETEstatic charC_DIVIDEstatic charC_DOWNstatic charC_ENDstatic charC_ESCstatic charC_F1static charC_F10static charC_F11static charC_F12static charC_F13static charC_F14static charC_F15static charC_F2static charC_F3static charC_F4static charC_F5static charC_F6static charC_F7static charC_F8static charC_F9static charC_HOMEstatic charC_INSERTstatic charC_LEFTstatic charC_METAstatic charC_MINUSstatic charC_MULTIPLYstatic charC_NEXTstatic charC_NUM_LOCKstatic charC_NUM0static charC_NUM1static charC_NUM2static charC_NUM3static charC_NUM4static charC_NUM5static charC_NUM6static charC_NUM7static charC_NUM8static charC_NUM9static charC_PAGE_DOWNstatic charC_PAGE_UPstatic charC_PAUSEstatic charC_PRINTSCREENstatic charC_RIGHTstatic charC_SCROLL_LOCKstatic charC_SEPARATORstatic charC_SHIFTstatic charC_UPstatic charC_WINstatic StringCAPS_LOCKstatic charcMaxstatic StringCMDstatic charcMinstatic StringCONTEXTstatic StringCTRLstatic StringDECIMALstatic StringDELETEstatic StringDIVIDEstatic StringDOWNstatic StringENDstatic StringENTERstatic StringESCstatic StringF1static StringF10static StringF11static StringF12static StringF13static StringF14static StringF15static StringF2static StringF3static StringF4static StringF5static StringF6static StringF7static StringF8static StringF9static StringHOMEstatic StringINSERTstatic intkeyMaxLengthstatic StringLEFTstatic StringMETAstatic StringMINUSstatic StringMULTIPLYstatic StringNEXTstatic StringNUM_LOCKstatic StringNUM0static StringNUM1static StringNUM2static StringNUM3static StringNUM4static StringNUM5static StringNUM6static StringNUM7static StringNUM8static StringNUM9static StringPAGE_DOWNstatic StringPAGE_UPstatic StringPAUSEstatic StringPRINTSCREENstatic StringRIGHTstatic StringSCROLL_LOCKstatic StringSEPARATORstatic StringSHIFTstatic StringSPACEstatic StringTABstatic StringUPstatic StringWIN -
Constructor Summary
Constructors Constructor Description Keys() -
Method Summary
Modifier and Type Method Description protected static intconvertModifiers(String mod)static voiddump()static StringgetKeyName(int key)static StringgetKeyName(String key)static Map<String,Integer>getKeyNames()static StringgetModifierName(String key)static StringgetModifierNames(int mod)static StringgetTextFromKeycode(int key)static booleanisModifier(String token)static booleanisRepeatable(String token)static int[]toJavaKeyCode(char key)static int[]toJavaKeyCode(String key)static inttoJavaKeyCodeFromText(String key)static StringtoJavaKeyCodeText(char key)
-
Field Details
-
SPACE
- See Also:
- Constant Field Values
-
ENTER
- See Also:
- Constant Field Values
-
BACKSPACE
- See Also:
- Constant Field Values
-
TAB
- See Also:
- Constant Field Values
-
ESC
- See Also:
- Constant Field Values
-
C_ESC
public static final char C_ESC- See Also:
- Constant Field Values
-
UP
- See Also:
- Constant Field Values
-
C_UP
public static final char C_UP- See Also:
- Constant Field Values
-
RIGHT
- See Also:
- Constant Field Values
-
C_RIGHT
public static final char C_RIGHT- See Also:
- Constant Field Values
-
DOWN
- See Also:
- Constant Field Values
-
C_DOWN
public static final char C_DOWN- See Also:
- Constant Field Values
-
LEFT
- See Also:
- Constant Field Values
-
C_LEFT
public static final char C_LEFT- See Also:
- Constant Field Values
-
PAGE_UP
- See Also:
- Constant Field Values
-
C_PAGE_UP
public static final char C_PAGE_UP- See Also:
- Constant Field Values
-
PAGE_DOWN
- See Also:
- Constant Field Values
-
C_PAGE_DOWN
public static final char C_PAGE_DOWN- See Also:
- Constant Field Values
-
DELETE
- See Also:
- Constant Field Values
-
C_DELETE
public static final char C_DELETE- See Also:
- Constant Field Values
-
END
- See Also:
- Constant Field Values
-
C_END
public static final char C_END- See Also:
- Constant Field Values
-
HOME
- See Also:
- Constant Field Values
-
C_HOME
public static final char C_HOME- See Also:
- Constant Field Values
-
INSERT
- See Also:
- Constant Field Values
-
C_INSERT
public static final char C_INSERT- See Also:
- Constant Field Values
-
F1
- See Also:
- Constant Field Values
-
C_F1
public static final char C_F1- See Also:
- Constant Field Values
-
F2
- See Also:
- Constant Field Values
-
C_F2
public static final char C_F2- See Also:
- Constant Field Values
-
F3
- See Also:
- Constant Field Values
-
C_F3
public static final char C_F3- See Also:
- Constant Field Values
-
F4
- See Also:
- Constant Field Values
-
C_F4
public static final char C_F4- See Also:
- Constant Field Values
-
F5
- See Also:
- Constant Field Values
-
C_F5
public static final char C_F5- See Also:
- Constant Field Values
-
F6
- See Also:
- Constant Field Values
-
C_F6
public static final char C_F6- See Also:
- Constant Field Values
-
F7
- See Also:
- Constant Field Values
-
C_F7
public static final char C_F7- See Also:
- Constant Field Values
-
F8
- See Also:
- Constant Field Values
-
C_F8
public static final char C_F8- See Also:
- Constant Field Values
-
F9
- See Also:
- Constant Field Values
-
C_F9
public static final char C_F9- See Also:
- Constant Field Values
-
F10
- See Also:
- Constant Field Values
-
C_F10
public static final char C_F10- See Also:
- Constant Field Values
-
F11
- See Also:
- Constant Field Values
-
C_F11
public static final char C_F11- See Also:
- Constant Field Values
-
F12
- See Also:
- Constant Field Values
-
C_F12
public static final char C_F12- See Also:
- Constant Field Values
-
F13
- See Also:
- Constant Field Values
-
C_F13
public static final char C_F13- See Also:
- Constant Field Values
-
F14
- See Also:
- Constant Field Values
-
C_F14
public static final char C_F14- See Also:
- Constant Field Values
-
F15
- See Also:
- Constant Field Values
-
C_F15
public static final char C_F15- See Also:
- Constant Field Values
-
SHIFT
- See Also:
- Constant Field Values
-
C_SHIFT
public static final char C_SHIFT- See Also:
- Constant Field Values
-
CTRL
- See Also:
- Constant Field Values
-
C_CTRL
public static final char C_CTRL- See Also:
- Constant Field Values
-
ALT
- See Also:
- Constant Field Values
-
C_ALT
public static final char C_ALT- See Also:
- Constant Field Values
-
ALTGR
- See Also:
- Constant Field Values
-
C_ALTGR
public static final char C_ALTGR- See Also:
- Constant Field Values
-
META
- See Also:
- Constant Field Values
-
C_META
public static final char C_META- See Also:
- Constant Field Values
-
CMD
- See Also:
- Constant Field Values
-
C_CMD
public static final char C_CMD- See Also:
- Constant Field Values
-
WIN
- See Also:
- Constant Field Values
-
C_WIN
public static final char C_WIN- See Also:
- Constant Field Values
-
PRINTSCREEN
- See Also:
- Constant Field Values
-
C_PRINTSCREEN
public static final char C_PRINTSCREEN- See Also:
- Constant Field Values
-
SCROLL_LOCK
- See Also:
- Constant Field Values
-
C_SCROLL_LOCK
public static final char C_SCROLL_LOCK- See Also:
- Constant Field Values
-
PAUSE
- See Also:
- Constant Field Values
-
C_PAUSE
public static final char C_PAUSE- See Also:
- Constant Field Values
-
CAPS_LOCK
- See Also:
- Constant Field Values
-
C_CAPS_LOCK
public static final char C_CAPS_LOCK- See Also:
- Constant Field Values
-
NUM0
- See Also:
- Constant Field Values
-
C_NUM0
public static final char C_NUM0- See Also:
- Constant Field Values
-
NUM1
- See Also:
- Constant Field Values
-
C_NUM1
public static final char C_NUM1- See Also:
- Constant Field Values
-
NUM2
- See Also:
- Constant Field Values
-
C_NUM2
public static final char C_NUM2- See Also:
- Constant Field Values
-
NUM3
- See Also:
- Constant Field Values
-
C_NUM3
public static final char C_NUM3- See Also:
- Constant Field Values
-
NUM4
- See Also:
- Constant Field Values
-
C_NUM4
public static final char C_NUM4- See Also:
- Constant Field Values
-
NUM5
- See Also:
- Constant Field Values
-
C_NUM5
public static final char C_NUM5- See Also:
- Constant Field Values
-
NUM6
- See Also:
- Constant Field Values
-
C_NUM6
public static final char C_NUM6- See Also:
- Constant Field Values
-
NUM7
- See Also:
- Constant Field Values
-
C_NUM7
public static final char C_NUM7- See Also:
- Constant Field Values
-
NUM8
- See Also:
- Constant Field Values
-
C_NUM8
public static final char C_NUM8- See Also:
- Constant Field Values
-
NUM9
- See Also:
- Constant Field Values
-
C_NUM9
public static final char C_NUM9- See Also:
- Constant Field Values
-
SEPARATOR
- See Also:
- Constant Field Values
-
C_SEPARATOR
public static final char C_SEPARATOR- See Also:
- Constant Field Values
-
NUM_LOCK
- See Also:
- Constant Field Values
-
C_NUM_LOCK
public static final char C_NUM_LOCK- See Also:
- Constant Field Values
-
ADD
- See Also:
- Constant Field Values
-
C_ADD
public static final char C_ADD- See Also:
- Constant Field Values
-
MINUS
- See Also:
- Constant Field Values
-
C_MINUS
public static final char C_MINUS- See Also:
- Constant Field Values
-
MULTIPLY
- See Also:
- Constant Field Values
-
C_MULTIPLY
public static final char C_MULTIPLY- See Also:
- Constant Field Values
-
DIVIDE
- See Also:
- Constant Field Values
-
C_DIVIDE
public static final char C_DIVIDE- See Also:
- Constant Field Values
-
DECIMAL
- See Also:
- Constant Field Values
-
C_DECIMAL
public static final char C_DECIMAL- See Also:
- Constant Field Values
-
CONTEXT
- See Also:
- Constant Field Values
-
C_CONTEXT
public static final char C_CONTEXT- See Also:
- Constant Field Values
-
NEXT
- See Also:
- Constant Field Values
-
C_NEXT
public static final char C_NEXT- See Also:
- Constant Field Values
-
cMax
public static final char cMax- See Also:
- Constant Field Values
-
cMin
public static final char cMin- See Also:
- Constant Field Values
-
keyMaxLength
public static int keyMaxLength
-
-
Constructor Details
-
Keys
public Keys()
-
-
Method Details
-
getTextFromKeycode
-
isRepeatable
-
isModifier
-
toJavaKeyCodeFromText
-
dump
public static void dump() -
getKeyNames
-
getModifierName
-
getModifierNames
-
getKeyName
-
getKeyName
-
toJavaKeyCode
-
toJavaKeyCode
public static int[] toJavaKeyCode(char key) -
toJavaKeyCodeText
-
convertModifiers
-