Class Key


  • public class Key
    extends java.lang.Object
    this class implements an interface to the Java key system as represented by java.awt.event.KeyEvent. for the functions Region.type() and Region.write() by translating key constants for special keys and plain text per character.
    for details consult the docs
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ADD  
      static java.lang.String ALT  
      static java.lang.String ALTGR  
      static java.lang.String BACKSPACE  
      static char C_ADD  
      static char C_ALT  
      static char C_ALTGR  
      static char C_CAPS_LOCK  
      static char C_CMD  
      static char C_CONTEXT  
      static char C_CTRL  
      static char C_DECIMAL  
      static char C_DELETE  
      static char C_DIVIDE  
      static char C_DOWN  
      static char C_END  
      static char C_ESC  
      static char C_F1  
      static char C_F10  
      static char C_F11  
      static char C_F12  
      static char C_F13  
      static char C_F14  
      static char C_F15  
      static char C_F2  
      static char C_F3  
      static char C_F4  
      static char C_F5  
      static char C_F6  
      static char C_F7  
      static char C_F8  
      static char C_F9  
      static char C_HOME  
      static char C_INSERT  
      static char C_LEFT  
      static char C_META  
      static char C_MINUS  
      static char C_MULTIPLY  
      static char C_NEXT  
      static char C_NUM_LOCK  
      static char C_NUM0  
      static char C_NUM1  
      static char C_NUM2  
      static char C_NUM3  
      static char C_NUM4  
      static char C_NUM5  
      static char C_NUM6  
      static char C_NUM7  
      static char C_NUM8  
      static char C_NUM9  
      static char C_PAGE_DOWN  
      static char C_PAGE_UP  
      static char C_PAUSE  
      static char C_PRINTSCREEN  
      static char C_RIGHT  
      static char C_SCROLL_LOCK  
      static char C_SEPARATOR  
      static char C_SHIFT  
      static char C_UP  
      static char C_WIN  
      static java.lang.String CAPS_LOCK  
      static char cMax  
      static java.lang.String CMD  
      static char cMin  
      static java.lang.String CONTEXT  
      static java.lang.String CTRL  
      static java.lang.String DECIMAL  
      static java.lang.String DELETE  
      static java.lang.String DIVIDE  
      static java.lang.String DOWN  
      static java.lang.String END  
      static java.lang.String ENTER  
      static java.lang.String ESC  
      static java.lang.String F1  
      static java.lang.String F10  
      static java.lang.String F11  
      static java.lang.String F12  
      static java.lang.String F13  
      static java.lang.String F14  
      static java.lang.String F15  
      static java.lang.String F2  
      static java.lang.String F3  
      static java.lang.String F4  
      static java.lang.String F5  
      static java.lang.String F6  
      static java.lang.String F7  
      static java.lang.String F8  
      static java.lang.String F9  
      static java.lang.String HOME  
      static java.lang.String INSERT  
      static java.lang.String keyboardUS  
      static int keyMaxLength  
      static java.lang.String LEFT  
      static java.lang.String META  
      static java.lang.String MINUS  
      static char[] MODIFIER_KEYS  
      static java.lang.String MULTIPLY  
      static java.lang.String NEXT  
      static java.lang.String NUM_LOCK  
      static java.lang.String NUM0  
      static java.lang.String NUM1  
      static java.lang.String NUM2  
      static java.lang.String NUM3  
      static java.lang.String NUM4  
      static java.lang.String NUM5  
      static java.lang.String NUM6  
      static java.lang.String NUM7  
      static java.lang.String NUM8  
      static java.lang.String NUM9  
      static java.lang.String PAGE_DOWN  
      static java.lang.String PAGE_UP  
      static java.lang.String PAUSE  
      static java.lang.String PRINTSCREEN  
      static java.lang.String RIGHT  
      static java.lang.String SCROLL_LOCK  
      static java.lang.String SEPARATOR  
      static java.lang.String SHIFT  
      static java.lang.String SPACE  
      static java.lang.String TAB  
      static java.lang.String UP  
      static java.lang.String WIN  
    • Constructor Summary

      Constructors 
      Constructor Description
      Key()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean addHotkey​(char key, int modifiers, org.sikuli.basics.HotkeyListener listener)
      add a hotkey and listener
      static boolean addHotkey​(java.lang.String key, int modifiers, org.sikuli.basics.HotkeyListener listener)
      add a hotkey and listener
      static java.lang.String convertKeyToText​(int code, int mod)
      INTERNAL USE ONLY
      static void createKeyTable()
      INTERNAL USE ONLY create a table containing all relevant key, keycode and keytext settings for VK_xxx
      static void dump()  
      static int getHotkeyModifier()
      HotKey modifier to be used with Sikuli's HotKey feature
      static java.lang.String getTextFromKeycode​(int key)  
      static boolean isLockOn​(char key)
      get the lock state of the given key
      static boolean isModifier​(char ch)  
      static boolean isModifier​(java.lang.String token)  
      static boolean isRepeatable​(java.lang.String token)  
      static boolean removeHotkey​(char key, int modifiers)
      remove a hotkey and listener
      static boolean removeHotkey​(java.lang.String key, int modifiers)
      remove a hotkey and listener
      static int[] toJavaKeyCode​(char key)
      Convert Sikuli Key to Java virtual key code
      static int[] toJavaKeyCode​(java.lang.String key)
      Convert Sikuli Key to Java virtual key code
      static int toJavaKeyCodeFromText​(java.lang.String key)  
      static java.lang.String toJavaKeyCodeText​(char key)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait