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

    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

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

    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

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

    • Unknown

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    • KeyCode

      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

    • getIndex

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object