Class KeyCode

java.lang.Object
com.luciad.input.KeyCode

public class KeyCode extends Object
Represents a key in the controller API.
See Also:
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    static final KeyCode
    A key code representing the 'A' key.
    static final KeyCode
    A key code representing the '*' key.
    static final KeyCode
    A key code representing the 'B' key.
    static final KeyCode
    A key code representing the backspace key.
    static final KeyCode
    A key code representing the 'C' key.
    static final KeyCode
    A key code representing the 'D' key.
    static final KeyCode
    A key code representing the down key.
    static final KeyCode
    A key code representing the 'E' key.
    static final KeyCode
    A key code representing the '8' key.
    static final KeyCode
    A key code representing the end key.
    static final KeyCode
    A key code representing the escape key.
    static final KeyCode
    A key code representing the 'F' key.
    static final KeyCode
    A key code representing the '5' key.
    static final KeyCode
    A key code representing the '4' key.
    static final KeyCode
    A key code representing the 'G' key.
    static final KeyCode
    A key code representing the 'H' key.
    static final KeyCode
    A key code representing the home key.
    static final KeyCode
    A key code representing the 'I' key.
    static final KeyCode
    A key code representing the 'J' key.
    static final KeyCode
    A key code representing the 'K' key.
    static final KeyCode
    A key code representing the 'L' key.
    static final KeyCode
    A key code representing the left key.
    static final KeyCode
    A key code representing the 'M' key.
    static final KeyCode
    A key code representing the '-' key.
    static final KeyCode
    A key code representing the 'N' key.
    static final KeyCode
    A key code representing the '9' key.
    static final KeyCode
    A key code representing the 'O' key.
    static final KeyCode
    A key code representing the '1' key.
    static final KeyCode
    A key code representing the 'P' key.
    static final KeyCode
    A key code representing the page down key.
    static final KeyCode
    A key code representing the pacge up key.
    static final KeyCode
    A key code representing the '+' key.
    static final KeyCode
    A key code representing the 'Q' key.
    static final KeyCode
    A key code representing the 'R' key.
    static final KeyCode
    A key code representing the right key.
    static final KeyCode
    A key code representing the 'S' key.
    static final KeyCode
    A key code representing the '7' key.
    static final KeyCode
    A key code representing the '6' key.
    static final KeyCode
    A key code representing the '/' key.
    static final KeyCode
    A key code representing the space key.
    static final KeyCode
    A key code representing the 'T' key.
    static final KeyCode
    A key code representing the '3' key.
    static final KeyCode
    A key code representing the '2' key.
    static final KeyCode
    A key code representing the 'U' key.
    static final KeyCode
    A key code representing an unknown key.
    static final KeyCode
    A key code representing the up key.
    static final KeyCode
    A key code representing the 'V' key.
    static final KeyCode
    A key code representing the 'W' key.
    static final KeyCode
    A key code representing the 'X' key.
    static final KeyCode
    A key code representing the 'Y' key.
    static final KeyCode
    A key code representing the 'Z' key.
    static final KeyCode
    A key code representing the '0' key.
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    KeyCode(long index)
    Creates a new KeyCode with the given index.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    boolean
    equals(@Nullable Object other)
     
    long
    The index of the key code.
    int
     

    Methods inherited from class java.lang.Object Link icon

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details Link icon

    • Unknown Link icon

      public static final KeyCode Unknown
      A key code representing an unknown key.
    • Space Link icon

      public static final KeyCode Space
      A key code representing the space key.
    • Plus Link icon

      public static final KeyCode Plus
      A key code representing the '+' key.
    • Minus Link icon

      public static final KeyCode Minus
      A key code representing the '-' key.
    • Asterisk Link icon

      public static final KeyCode Asterisk
      A key code representing the '*' key.
    • Slash Link icon

      public static final KeyCode Slash
      A key code representing the '/' key.
    • Escape Link icon

      public static final KeyCode Escape
      A key code representing the escape key.
    • Backspace Link icon

      public static final KeyCode Backspace
      A key code representing the backspace key.
    • Zero Link icon

      public static final KeyCode Zero
      A key code representing the '0' key.
    • One Link icon

      public static final KeyCode One
      A key code representing the '1' key.
    • Two Link icon

      public static final KeyCode Two
      A key code representing the '2' key.
    • Three Link icon

      public static final KeyCode Three
      A key code representing the '3' key.
    • Four Link icon

      public static final KeyCode Four
      A key code representing the '4' key.
    • Five Link icon

      public static final KeyCode Five
      A key code representing the '5' key.
    • Six Link icon

      public static final KeyCode Six
      A key code representing the '6' key.
    • Seven Link icon

      public static final KeyCode Seven
      A key code representing the '7' key.
    • Eight Link icon

      public static final KeyCode Eight
      A key code representing the '8' key.
    • Nine Link icon

      public static final KeyCode Nine
      A key code representing the '9' key.
    • A Link icon

      public static final KeyCode A
      A key code representing the 'A' key.
    • B Link icon

      public static final KeyCode B
      A key code representing the 'B' key.
    • C Link icon

      public static final KeyCode C
      A key code representing the 'C' key.
    • D Link icon

      public static final KeyCode D
      A key code representing the 'D' key.
    • E Link icon

      public static final KeyCode E
      A key code representing the 'E' key.
    • F Link icon

      public static final KeyCode F
      A key code representing the 'F' key.
    • G Link icon

      public static final KeyCode G
      A key code representing the 'G' key.
    • H Link icon

      public static final KeyCode H
      A key code representing the 'H' key.
    • I Link icon

      public static final KeyCode I
      A key code representing the 'I' key.
    • J Link icon

      public static final KeyCode J
      A key code representing the 'J' key.
    • K Link icon

      public static final KeyCode K
      A key code representing the 'K' key.
    • L Link icon

      public static final KeyCode L
      A key code representing the 'L' key.
    • M Link icon

      public static final KeyCode M
      A key code representing the 'M' key.
    • N Link icon

      public static final KeyCode N
      A key code representing the 'N' key.
    • O Link icon

      public static final KeyCode O
      A key code representing the 'O' key.
    • P Link icon

      public static final KeyCode P
      A key code representing the 'P' key.
    • Q Link icon

      public static final KeyCode Q
      A key code representing the 'Q' key.
    • R Link icon

      public static final KeyCode R
      A key code representing the 'R' key.
    • S Link icon

      public static final KeyCode S
      A key code representing the 'S' key.
    • T Link icon

      public static final KeyCode T
      A key code representing the 'T' key.
    • U Link icon

      public static final KeyCode U
      A key code representing the 'U' key.
    • V Link icon

      public static final KeyCode V
      A key code representing the 'V' key.
    • W Link icon

      public static final KeyCode W
      A key code representing the 'W' key.
    • X Link icon

      public static final KeyCode X
      A key code representing the 'X' key.
    • Y Link icon

      public static final KeyCode Y
      A key code representing the 'Y' key.
    • Z Link icon

      public static final KeyCode Z
      A key code representing the 'Z' key.
    • Home Link icon

      public static final KeyCode Home
      A key code representing the home key.
    • End Link icon

      public static final KeyCode End
      A key code representing the end key.
    • Left Link icon

      public static final KeyCode Left
      A key code representing the left key.
    • Up Link icon

      public static final KeyCode Up
      A key code representing the up key.
    • Down Link icon

      public static final KeyCode Down
      A key code representing the down key.
    • PageUp Link icon

      public static final KeyCode PageUp
      A key code representing the pacge up key.
    • PageDown Link icon

      public static final KeyCode PageDown
      A key code representing the page down key.
  • Constructor Details Link icon

    • KeyCode Link icon

      public KeyCode(long index)
      Creates a new KeyCode with the given index.

      The key button index maps on to keys as follows:

      • 0 => Unknown
      • 8 => Backspace
      • 27 => Escape
      • 32 => Space
      • 42 => Asterisk
      • 43 => Plus
      • 45 => Minus
      • 47 => Slash
      • 48 => 0
      • 49 => 1
      • ...
      • 57 => 9
      • 65 => A
      • 66 => B
      • ...
      • 90 => Z
      • 200 => Home
      • 201 => End
      • 202 => Left
      • 203 => Up
      • 204 => Right
      • 205 => Down
      • 206 => Page-Up
      • 207 => Page-Down

      If needed other indexes can be used if out of those values. For example if you want to handle unicode characters. Please use index values greater than 1024 for custom key codes.

      Parameters:
      index - the mouse button index.
  • Method Details Link icon

    • getIndex Link icon

      public long getIndex()
      The index of the key code.
    • equals Link icon

      public boolean equals(@Nullable @Nullable Object other)
      Overrides:
      equals in class Object
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object