|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
Classes | |
| class | NonPrintableRange |
Public Member Functions | |
| final char | getKeyChar () |
Returns the UTF-16 character reflecting the key symbol incl. More... | |
| final short | getKeySymbol () |
| Returns the virtual key symbol reflecting the current keyboard layout. More... | |
| final short | getKeyCode () |
| Returns the virtual key code using a fixed mapping to the US keyboard layout. More... | |
| final String | toString () |
| final StringBuilder | toString (StringBuilder sb) |
| final boolean | isModifierKey () |
Returns true if key symbol represents a modifier key, otherwise false. More... | |
| final boolean | isActionKey () |
Returns true if key symbol represents a non-printable and non-modifier action key, otherwise false. More... | |
| final boolean | isPrintableKey () |
Returns true if key symbol and key char represents a printable character, i.e. More... | |
Public Member Functions inherited from com.jogamp.newt.event.InputEvent | |
| final int | getModifiers () |
| Return the modifier bits of this event, e.g. More... | |
| final boolean | isAltDown () |
getModifiers() contains ALT_MASK. More... | |
| final boolean | isAltGraphDown () |
getModifiers() contains ALT_GRAPH_MASK. More... | |
| final boolean | isControlDown () |
getModifiers() contains CTRL_MASK. More... | |
| final boolean | isMetaDown () |
getModifiers() contains META_MASK. More... | |
| final boolean | isShiftDown () |
getModifiers() contains SHIFT_MASK. More... | |
| final boolean | isAutoRepeat () |
getModifiers() contains AUTOREPEAT_MASK. More... | |
| final boolean | isConfined () |
getModifiers() contains CONFINED_MASK. More... | |
| final boolean | isInvisible () |
getModifiers() contains INVISIBLE_MASK. More... | |
| final StringBuilder | getModifiersString (StringBuilder sb) |
| final short[] | getButtonsDown () |
See also MouseEvent's section about Multiple-Pointer Events. More... | |
| final boolean | isButtonDown (final int button) |
See also MouseEvent's section about Multiple-Pointer Events. More... | |
| final int | getButtonDownCount () |
| Returns the number of pressed buttons by counting the set bits: More... | |
| final boolean | isAnyButtonDown () |
| Returns true if at least one button is pressed, otherwise false: More... | |
| String | toString () |
| StringBuilder | toString (StringBuilder sb) |
Public Member Functions inherited from com.jogamp.newt.event.NEWTEvent | |
| final short | getEventType () |
| Returns the event type of this event. More... | |
| final long | getWhen () |
| Returns the timestamp, in milliseconds, of this event. More... | |
| final void | setAttachment (final Object attachment) |
| Attach the passed object to this event. More... | |
| final Object | getAttachment () |
| final boolean | isConsumed () |
Returns true if this events has been consumed, otherwise false. More... | |
| final void | setConsumed (final boolean consumed) |
If consumed is true, this event is marked as consumed, ie. More... | |
| String | toString () |
| StringBuilder | toString (StringBuilder sb) |
Static Public Member Functions | |
| static KeyEvent | create (final short eventType, final Object source, final long when, final int modifiers, final short keyCode, final short keySym, final char keyChar) |
| static String | getEventTypeString (final short type) |
| static short | utf16ToVKey (final char keyChar) |
| static boolean | isModifierKey (final short vKey) |
Returns true if the given virtualKey represents a modifier key, otherwise false. More... | |
| static int | getModifierMask (final short vKey) |
If vKey is a modifier key, method returns the corresponding modifier mask, otherwise 0. More... | |
| static boolean | isPrintableKey (final short uniChar, final boolean isKeyChar) |
Returns true if given uniChar represents a printable character, i.e. More... | |
Static Public Member Functions inherited from com.jogamp.newt.event.InputEvent | |
| static final int | getButtonMask (final int button) |
| Returns the corresponding button mask for the given button. More... | |
Static Public Member Functions inherited from com.jogamp.newt.event.NEWTEvent | |
| static String | toHexString (final short hex) |
Static Public Attributes | |
| static final short | EVENT_KEY_PRESSED = 300 |
A key has been pressed, excluding auto-repeat-modifier keys. More... | |
| static final short | EVENT_KEY_RELEASED = 301 |
A key has been released, excluding auto-repeat-modifier keys. More... | |
| static final char | NULL_CHAR = '\0' |
This value, '\0', is used to indicate that the keyChar is unknown or not printable. More... | |
| static final NonPrintableRange[] | nonPrintableKeys |
| Non printable key ranges, currently fixed to an array of size 4. More... | |
| static final short | VK_UNDEFINED = (short) 0x0 |
| This value, {@value}, is used to indicate that the keyCode is unknown. More... | |
| static final short | VK_HOME = (short) 0x02 |
| Constant for the HOME function key. More... | |
| static final short | VK_END = (short) 0x03 |
| Constant for the END function key. More... | |
| static final short | VK_FINAL = (short) 0x04 |
| Constant for the END function key. More... | |
| static final short | VK_PRINTSCREEN = (short) 0x05 |
| Constant for the PRINT function key. More... | |
| static final short | VK_BACK_SPACE = (short) 0x08 |
| Constant for the BACK SPACE key "\b", matching ASCII. More... | |
| static final short | VK_TAB = (short) 0x09 |
| Constant for the HORIZ TAB key "\t", matching ASCII. More... | |
| static final short | VK_PAGE_DOWN = (short) 0x0B |
| Constant for the PAGE DOWN function key. More... | |
| static final short | VK_CLEAR = (short) 0x0C |
| Constant for the CLEAR key, i.e. More... | |
| static final short | VK_ENTER = (short) 0x0D |
| Constant for the ENTER key, i.e. More... | |
| static final short | VK_SHIFT = (short) 0x0F |
| Constant for the CTRL function key. More... | |
| static final short | VK_PAGE_UP = (short) 0x10 |
| Constant for the PAGE UP function key. More... | |
| static final short | VK_CONTROL = (short) 0x11 |
| Constant for the CTRL function key. More... | |
| static final short | VK_ALT = (short) 0x12 |
| Constant for the left ALT function key. More... | |
| static final short | VK_ALT_GRAPH = (short) 0x13 |
| Constant for the ALT_GRAPH function key, i.e. More... | |
| static final short | VK_CAPS_LOCK = (short) 0x14 |
| Constant for the CAPS LOCK function key. More... | |
| static final short | VK_PAUSE = (short) 0x16 |
| Constant for the PAUSE function key. More... | |
| static final short | VK_SCROLL_LOCK = (short) 0x17 |
| scroll lock key. More... | |
| static final short | VK_CANCEL = (short) 0x18 |
| Constant for the CANCEL function key. More... | |
| static final short | VK_INSERT = (short) 0x1A |
| Constant for the INSERT function key. More... | |
| static final short | VK_ESCAPE = (short) 0x1B |
| Constant for the ESCAPE function key. More... | |
| static final short | VK_CONVERT = (short) 0x1C |
| Constant for the Convert function key, Japanese "henkan". More... | |
| static final short | VK_NONCONVERT = (short) 0x1D |
| Constant for the Don't Convert function key, Japanese "muhenkan". More... | |
| static final short | VK_ACCEPT = (short) 0x1E |
| Constant for the Accept or Commit function key, Japanese "kakutei". More... | |
| static final short | VK_MODECHANGE = (short) 0x1F |
| Constant for the Mode Change (?). More... | |
| static final short | VK_SPACE = (short) 0x20 |
| Constant for the SPACE function key. More... | |
| static final short | VK_EXCLAMATION_MARK = (short) 0x21 |
| Constant for the "!" key. More... | |
| static final short | VK_QUOTEDBL = (short) 0x22 |
| Constant for the """ key. More... | |
| static final short | VK_NUMBER_SIGN = (short) 0x23 |
| Constant for the "#" key. More... | |
| static final short | VK_DOLLAR = (short) 0x24 |
| Constant for the "$" key. More... | |
| static final short | VK_PERCENT = (short) 0x25 |
| Constant for the "%" key. More... | |
| static final short | VK_AMPERSAND = (short) 0x26 |
| Constant for the "&" key. More... | |
| static final short | VK_QUOTE = (short) 0x27 |
| Constant for the "'" key. More... | |
| static final short | VK_LEFT_PARENTHESIS = (short) 0x28 |
| Constant for the "(" key. More... | |
| static final short | VK_RIGHT_PARENTHESIS = (short) 0x29 |
| Constant for the ")" key. More... | |
| static final short | VK_ASTERISK = (short) 0x2A |
| Constant for the "*" key. More... | |
| static final short | VK_PLUS = (short) 0x2B |
| Constant for the "+" key. More... | |
| static final short | VK_COMMA = (short) 0x2C |
| Constant for the comma key, ",". More... | |
| static final short | VK_MINUS = (short) 0x2D |
| Constant for the minus key, "-". More... | |
| static final short | VK_PERIOD = (short) 0x2E |
| Constant for the period key, ".". More... | |
| static final short | VK_SLASH = (short) 0x2F |
| Constant for the forward slash key, "/". More... | |
| static final short | VK_0 = (short) 0x30 |
| VK_0 thru VK_9 are the same as UTF16/ASCII '0' thru '9' [0x30 - 0x39]. More... | |
| static final short | VK_1 = (short) 0x31 |
See VK_0. More... | |
| static final short | VK_2 = (short) 0x32 |
See VK_0. More... | |
| static final short | VK_3 = (short) 0x33 |
See VK_0. More... | |
| static final short | VK_4 = (short) 0x34 |
See VK_0. More... | |
| static final short | VK_5 = (short) 0x35 |
See VK_0. More... | |
| static final short | VK_6 = (short) 0x36 |
See VK_0. More... | |
| static final short | VK_7 = (short) 0x37 |
See VK_0. More... | |
| static final short | VK_8 = (short) 0x38 |
See VK_0. More... | |
| static final short | VK_9 = (short) 0x39 |
See VK_0. More... | |
| static final short | VK_COLON = (short) 0x3A |
| Constant for the ":" key. More... | |
| static final short | VK_SEMICOLON = (short) 0x3B |
| Constant for the semicolon key, ";". More... | |
| static final short | VK_LESS = (short) 0x3C |
| Constant for the equals key, "<". More... | |
| static final short | VK_EQUALS = (short) 0x3D |
| Constant for the equals key, "=". More... | |
| static final short | VK_GREATER = (short) 0x3E |
| Constant for the equals key, ">". More... | |
| static final short | VK_QUESTIONMARK = (short) 0x3F |
| Constant for the equals key, "?". More... | |
| static final short | VK_AT = (short) 0x40 |
| Constant for the equals key, "@". More... | |
| static final short | VK_A = (short) 0x41 |
| VK_A thru VK_Z are the same as Capital UTF16/ASCII 'A' thru 'Z' (0x41 - 0x5A) More... | |
| static final short | VK_B = (short) 0x42 |
See VK_A. More... | |
| static final short | VK_C = (short) 0x43 |
See VK_A. More... | |
| static final short | VK_D = (short) 0x44 |
See VK_A. More... | |
| static final short | VK_E = (short) 0x45 |
See VK_A. More... | |
| static final short | VK_F = (short) 0x46 |
See VK_A. More... | |
| static final short | VK_G = (short) 0x47 |
See VK_A. More... | |
| static final short | VK_H = (short) 0x48 |
See VK_A. More... | |
| static final short | VK_I = (short) 0x49 |
See VK_A. More... | |
| static final short | VK_J = (short) 0x4A |
See VK_A. More... | |
| static final short | VK_K = (short) 0x4B |
See VK_A. More... | |
| static final short | VK_L = (short) 0x4C |
See VK_A. More... | |
| static final short | VK_M = (short) 0x4D |
See VK_A. More... | |
| static final short | VK_N = (short) 0x4E |
See VK_A. More... | |
| static final short | VK_O = (short) 0x4F |
See VK_A. More... | |
| static final short | VK_P = (short) 0x50 |
See VK_A. More... | |
| static final short | VK_Q = (short) 0x51 |
See VK_A. More... | |
| static final short | VK_R = (short) 0x52 |
See VK_A. More... | |
| static final short | VK_S = (short) 0x53 |
See VK_A. More... | |
| static final short | VK_T = (short) 0x54 |
See VK_A. More... | |
| static final short | VK_U = (short) 0x55 |
See VK_A. More... | |
| static final short | VK_V = (short) 0x56 |
See VK_A. More... | |
| static final short | VK_W = (short) 0x57 |
See VK_A. More... | |
| static final short | VK_X = (short) 0x58 |
See VK_A. More... | |
| static final short | VK_Y = (short) 0x59 |
See VK_A. More... | |
| static final short | VK_Z = (short) 0x5A |
See VK_A. More... | |
| static final short | VK_OPEN_BRACKET = (short) 0x5B |
| Constant for the open bracket key, "[". More... | |
| static final short | VK_BACK_SLASH = (short) 0x5C |
| Constant for the back slash key, "\". More... | |
| static final short | VK_CLOSE_BRACKET = (short) 0x5D |
| Constant for the close bracket key, "]". More... | |
| static final short | VK_CIRCUMFLEX = (short) 0x5E |
| Constant for the "^" key. More... | |
| static final short | VK_UNDERSCORE = (short) 0x5F |
| Constant for the "_" key. More... | |
| static final short | VK_BACK_QUOTE = (short) 0x60 |
| Constant for the "`" key. More... | |
| static final short | VK_F1 = (short) ( 0x60+ 1 ) |
| Small UTF/ASCII 'a' thru 'z' (0x61 - 0x7a) - Not used for keyCode / keySym. More... | |
| static final short | VK_F2 = (short) ( 0x60+ 2 ) |
| Constant for the F2 function key. More... | |
| static final short | VK_F3 = (short) ( 0x60+ 3 ) |
| Constant for the F3 function key. More... | |
| static final short | VK_F4 = (short) ( 0x60+ 4 ) |
| Constant for the F4 function key. More... | |
| static final short | VK_F5 = (short) ( 0x60+ 5 ) |
| Constant for the F5 function key. More... | |
| static final short | VK_F6 = (short) ( 0x60+ 6 ) |
| Constant for the F6 function key. More... | |
| static final short | VK_F7 = (short) ( 0x60+ 7 ) |
| Constant for the F7 function key. More... | |
| static final short | VK_F8 = (short) ( 0x60+ 8 ) |
| Constant for the F8 function key. More... | |
| static final short | VK_F9 = (short) ( 0x60+ 9 ) |
| Constant for the F9 function key. More... | |
| static final short | VK_F10 = (short) ( 0x60+10 ) |
| Constant for the F11 function key. More... | |
| static final short | VK_F11 = (short) ( 0x60+11 ) |
| Constant for the F11 function key. More... | |
| static final short | VK_F12 = (short) ( 0x60+12 ) |
| Constant for the F12 function key. More... | |
| static final short | VK_F13 = (short) ( 0x60+13 ) |
| Constant for the F13 function key. More... | |
| static final short | VK_F14 = (short) ( 0x60+14 ) |
| Constant for the F14 function key. More... | |
| static final short | VK_F15 = (short) ( 0x60+15 ) |
| Constant for the F15 function key. More... | |
| static final short | VK_F16 = (short) ( 0x60+16 ) |
| Constant for the F16 function key. More... | |
| static final short | VK_F17 = (short) ( 0x60+17 ) |
| Constant for the F17 function key. More... | |
| static final short | VK_F18 = (short) ( 0x60+18 ) |
| Constant for the F18 function key. More... | |
| static final short | VK_F19 = (short) ( 0x60+19 ) |
| Constant for the F19 function key. More... | |
| static final short | VK_F20 = (short) ( 0x60+20 ) |
| Constant for the F20 function key. More... | |
| static final short | VK_F21 = (short) ( 0x60+21 ) |
| Constant for the F21 function key. More... | |
| static final short | VK_F22 = (short) ( 0x60+22 ) |
| Constant for the F22 function key. More... | |
| static final short | VK_F23 = (short) ( 0x60+23 ) |
| Constant for the F23 function key. More... | |
| static final short | VK_F24 = (short) ( 0x60+24 ) |
| Constant for the F24 function key. More... | |
| static final short | VK_LEFT_BRACE = (short) 0x7B |
| Constant for the "{" key. More... | |
| static final short | VK_PIPE = (short) 0x7C |
| Constant for the "|" key. More... | |
| static final short | VK_RIGHT_BRACE = (short) 0x7D |
| Constant for the "}" key. More... | |
| static final short | VK_TILDE = (short) 0x7E |
| Constant for the "~" key, matching ASCII. More... | |
| static final short | VK_SEPARATOR = (short) 0x7F |
| Numeric keypad decimal separator key. More... | |
| static final short | VK_NUMPAD0 = (short) 0x80 |
| Numeric keypad VK_NUMPAD0 thru VK_NUMPAD9 are mapped to UTF control (0x80 - 0x89). More... | |
| static final short | VK_NUMPAD1 = (short) 0x81 |
See VK_NUMPAD0. More... | |
| static final short | VK_NUMPAD2 = (short) 0x82 |
See VK_NUMPAD0. More... | |
| static final short | VK_NUMPAD3 = (short) 0x83 |
See VK_NUMPAD0. More... | |
| static final short | VK_NUMPAD4 = (short) 0x84 |
See VK_NUMPAD0. More... | |
| static final short | VK_NUMPAD5 = (short) 0x85 |
See VK_NUMPAD0. More... | |
| static final short | VK_NUMPAD6 = (short) 0x86 |
See VK_NUMPAD0. More... | |
| static final short | VK_NUMPAD7 = (short) 0x87 |
See VK_NUMPAD0. More... | |
| static final short | VK_NUMPAD8 = (short) 0x88 |
See VK_NUMPAD0. More... | |
| static final short | VK_NUMPAD9 = (short) 0x89 |
See VK_NUMPAD0. More... | |
| static final short | VK_DECIMAL = (short) 0x8A |
| Numeric keypad decimal separator key. More... | |
| static final short | VK_ADD = (short) 0x8B |
| Numeric keypad add key. More... | |
| static final short | VK_SUBTRACT = (short) 0x8C |
| Numeric keypad subtract key. More... | |
| static final short | VK_MULTIPLY = (short) 0x8D |
| Numeric keypad multiply key. More... | |
| static final short | VK_DIVIDE = (short) 0x8E |
| Numeric keypad divide key. More... | |
| static final short | VK_DELETE = (short) 0x93 |
| Constant for the DEL key, matching ASCII. More... | |
| static final short | VK_NUM_LOCK = (short) 0x94 |
| Numeric keypad num lock key. More... | |
| static final short | VK_LEFT = (short) 0x95 |
| Constant for the cursor- or numerical-pad left arrow key. More... | |
| static final short | VK_UP = (short) 0x96 |
| Constant for the cursor- or numerical-pad up arrow key. More... | |
| static final short | VK_RIGHT = (short) 0x97 |
| Constant for the cursor- or numerical-pad right arrow key. More... | |
| static final short | VK_DOWN = (short) 0x98 |
| Constant for the cursor- or numerical pad down arrow key. More... | |
| static final short | VK_CONTEXT_MENU = (short) 0x99 |
| Constant for the Context Menu key. More... | |
| static final short | VK_WINDOWS = (short) 0x9A |
| Constant for the MS "Windows" function key. More... | |
| static final short | VK_META = (short) 0x9B |
| Constant for the Meta function key. More... | |
| static final short | VK_HELP = (short) 0x9C |
| Constant for the Help function key. More... | |
| static final short | VK_COMPOSE = (short) 0x9D |
| Constant for the Compose function key. More... | |
| static final short | VK_BEGIN = (short) 0x9E |
| Constant for the Begin function key. More... | |
| static final short | VK_STOP = (short) 0x9F |
| Constant for the Stop function key. More... | |
| static final short | VK_INVERTED_EXCLAMATION_MARK = (short) 0xA1 |
| Constant for the inverted exclamation mark key. More... | |
| static final short | VK_EURO_SIGN = (short) 0x20AC |
| Constant for the Euro currency sign key. More... | |
| static final short | VK_CUT = (short) 0xF879 |
| static final short | VK_COPY = (short) 0xF87A |
| static final short | VK_PASTE = (short) 0xF87B |
| static final short | VK_UNDO = (short) 0xF87C |
| static final short | VK_AGAIN = (short) 0xF87D |
| static final short | VK_FIND = (short) 0xF87E |
| static final short | VK_PROPS = (short) 0xF87F |
| static final short | VK_INPUT_METHOD_ON_OFF = (short) 0xF890 |
| Constant for the input method on/off key. More... | |
| static final short | VK_CODE_INPUT = (short) 0xF891 |
| Constant for the Code Input function key. More... | |
| static final short | VK_ROMAN_CHARACTERS = (short) 0xF892 |
| Constant for the Roman Characters function key. More... | |
| static final short | VK_ALL_CANDIDATES = (short) 0xF893 |
| Constant for the All Candidates function key. More... | |
| static final short | VK_PREVIOUS_CANDIDATE = (short) 0xF894 |
| Constant for the Previous Candidate function key. More... | |
| static final short | VK_ALPHANUMERIC = (short) 0xF895 |
| Constant for the Alphanumeric function key. More... | |
| static final short | VK_KATAKANA = (short) 0xF896 |
| Constant for the Katakana function key. More... | |
| static final short | VK_HIRAGANA = (short) 0xF897 |
| Constant for the Hiragana function key. More... | |
| static final short | VK_FULL_WIDTH = (short) 0xF898 |
| Constant for the Full-Width Characters function key. More... | |
| static final short | VK_HALF_WIDTH = (short) 0xF89A |
| Constant for the Half-Width Characters function key. More... | |
| static final short | VK_JAPANESE_KATAKANA = (short) 0xF89B |
| Constant for the Japanese-Katakana function key. More... | |
| static final short | VK_JAPANESE_HIRAGANA = (short) 0xF89C |
| Constant for the Japanese-Hiragana function key. More... | |
| static final short | VK_JAPANESE_ROMAN = (short) 0xF89D |
| Constant for the Japanese-Roman function key. More... | |
| static final short | VK_KANA_LOCK = (short) 0xF89F |
| Constant for the locking Kana function key. More... | |
| static final short | VK_KEYBOARD_INVISIBLE = (short) 0xF8FF |
| Constant for Keyboard became invisible, e.g. More... | |
Static Public Attributes inherited from com.jogamp.newt.event.InputEvent | |
| static final int | SHIFT_MASK = 1 << 0 |
| static final int | CTRL_MASK = 1 << 1 |
| static final int | META_MASK = 1 << 2 |
| static final int | ALT_MASK = 1 << 3 |
| static final int | ALT_GRAPH_MASK = 1 << 4 |
| static final int | BUTTON1_MASK = 1 << 5 |
| static final int | BUTTON2_MASK = 1 << 6 |
| static final int | BUTTON3_MASK = 1 << 7 |
| static final int | BUTTON4_MASK = 1 << 8 |
| static final int | BUTTON5_MASK = 1 << 9 |
| static final int | BUTTON6_MASK = 1 << 10 |
| static final int | BUTTON7_MASK = 1 << 11 |
| static final int | BUTTON8_MASK = 1 << 12 |
| static final int | BUTTON9_MASK = 1 << 13 |
| static final int | BUTTONLAST_MASK = 1 << 20 |
| static final int | BUTTONALL_MASK = 0xffff << 5 |
| static final int | AUTOREPEAT_MASK = 1 << 29 |
| Event is caused by auto-repeat. More... | |
| static final int | CONFINED_MASK = 1 << 30 |
Pointer is confined, see Window#confinePointer(boolean). More... | |
| static final int | INVISIBLE_MASK = 1 << 31 |
Pointer is invisible, see Window#setPointerVisible(boolean). More... | |
Static Public Attributes inherited from com.jogamp.newt.event.NEWTEvent | |
| static final Object | consumedTag = new Object() |
See setConsumed(boolean) for description. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from com.jogamp.newt.event.InputEvent | |
| InputEvent (final short eventType, final Object source, final long when, final int modifiers) | |
Protected Member Functions inherited from com.jogamp.newt.event.NEWTEvent | |
| NEWTEvent (final short eventType, final Object source, final long when) | |
Key events are delivered in the following order:
| # | Event Type | Constraints | Notes |
|---|---|---|---|
| 1 | EVENT_KEY_PRESSED | excluding auto-repeat-modifier keys | |
| 2 | EVENT_KEY_RELEASED | excluding auto-repeat-modifier keys |
In case the native platform does not deliver keyboard events in the above order or skip events, the NEWT driver will reorder and inject synthetic events if required.
Besides regular modifiers like InputEvent#SHIFT_MASK etc., the InputEvent#AUTOREPEAT_MASK bit is added if repetition is detected, following above constraints.
Auto-Repeat shall behave as follow:
P = pressed, R = released 0 = normal, 1 = auto-repeat P(0), [ R(1), P(1), R(1), ..], R(0)
The idea is if you mask out auto-repeat in your event listener you just get one long pressed P/R tuple for printable and Action keys.
Action keys will produce pressed and released events including auto-repeat.
Printable keys will produce pressed and released events.
Modifier keys will produce pressed and released events excluding auto-repeat. They will also influence subsequent event's modifier bits while pressed.
Key-chars, as well as printable key-codes and key-symbols use the UTF-16 unicode space w/o collision.
Non-printable key-codes and key-symbols, i.e. modifier- and action-keys, are mapped to unicode's control and private range and do not collide w/ printable unicode values with the following exception.
The following Key-codes and key-symbols collide w/ unicode space:
| unicode range | virtual key code | unicode character |
|---|---|---|
| [0x61 .. 0x78] | [VK_F1..VK_F24] | ['a'..'x'] |
Collision was chosen for Key-code and key-symbol mapping to allow a minimal code range, i.e. [0..255]. The reduced code range in turn allows the implementation to utilize fast and small lookup tables, e.g. to implement a key-press state tracker.
http://www.utf8-chartable.de/unicode-utf8-table.pl http://www.unicode.org/Public/5.1.0/ucd/PropList.txt https://en.wikipedia.org/wiki/Mapping_of_Unicode_characters https://en.wikipedia.org/wiki/Unicode_control_characters https://en.wikipedia.org/wiki/Private_Use_%28Unicode%29#Private_Use_Areas
Definition at line 119 of file KeyEvent.java.
|
static |
Definition at line 151 of file KeyEvent.java.
|
static |
Definition at line 214 of file KeyEvent.java.
| final char com.jogamp.newt.event.KeyEvent.getKeyChar | ( | ) |
Returns the UTF-16 character reflecting the key symbol incl.
active modifiers.
Definition at line 161 of file KeyEvent.java.
| final short com.jogamp.newt.event.KeyEvent.getKeyCode | ( | ) |
Returns the virtual key code using a fixed mapping to the US keyboard layout.
In contrast to key symbol, key code uses a fixed US keyboard layout and therefore is keyboard layout independent.
E.g. virtual key code VK_Y denotes the same physical key regardless whether keyboard layout QWERTY or QWERTZ is active. The key symbol of the former is VK_Y, where the latter produces VK_Y.
Definition at line 195 of file KeyEvent.java.
| final short com.jogamp.newt.event.KeyEvent.getKeySymbol | ( | ) |
Returns the virtual key symbol reflecting the current keyboard layout.
For printable keys, the key symbol is the unmodified representation of the UTF-16 key char.
E.g. symbol [VK_A, 'A'] for char 'a'.
Definition at line 176 of file KeyEvent.java.
|
static |
If vKey is a modifier key, method returns the corresponding modifier mask, otherwise 0.
Definition at line 257 of file KeyEvent.java.
| final boolean com.jogamp.newt.event.KeyEvent.isActionKey | ( | ) |
Returns true if key symbol represents a non-printable and non-modifier action key, otherwise false.
Hence it is the set A of all keys U w/o printable P and w/o modifiers M: A = U - ( P + M )
Definition at line 296 of file KeyEvent.java.
| final boolean com.jogamp.newt.event.KeyEvent.isModifierKey | ( | ) |
Returns true if key symbol represents a modifier key, otherwise false.
See isModifierKey(short) for details.
Note: Implementation uses a cached value.
Definition at line 282 of file KeyEvent.java.
|
static |
Returns true if the given virtualKey represents a modifier key, otherwise false.
A modifier key is one of VK_SHIFT, VK_CONTROL, VK_ALT, VK_ALT_GRAPH, VK_META.
Definition at line 240 of file KeyEvent.java.
| final boolean com.jogamp.newt.event.KeyEvent.isPrintableKey | ( | ) |
Returns true if key symbol and key char represents a printable character, i.e.
a value other than VK_UNDEFINED and not a control or non-printable private code.
A printable character is neither a modifier key, nor an action key.
Otherwise returns false.
Definition at line 349 of file KeyEvent.java.
|
static |
Returns true if given uniChar represents a printable character, i.e.
a value other than VK_UNDEFINED and not a control or non-printable private code.
A printable character is neither a modifier key, nor an action key.
Otherwise returns false.
Distinction of key character and virtual key code is made due to unicode collision.
| uniChar | the UTF-16 unicode value, which maybe a virtual key code or key character. |
| isKeyChar | true if uniChar is a key character, otherwise a virtual key code |
Definition at line 316 of file KeyEvent.java.
| final String com.jogamp.newt.event.KeyEvent.toString | ( | ) |
Reimplemented from com.jogamp.newt.event.InputEvent.
Definition at line 200 of file KeyEvent.java.
| final StringBuilder com.jogamp.newt.event.KeyEvent.toString | ( | StringBuilder | sb | ) |
Reimplemented from com.jogamp.newt.event.InputEvent.
Definition at line 205 of file KeyEvent.java.
|
static |
| keyChar | UTF16 value to map. It is expected that the incoming keyChar value is unshifted and unmodified, however, lower case a-z is mapped to KeyEvent#VK_A - KeyEvent#VK_Z. |
KeyEvent virtual key (VK) value. Definition at line 227 of file KeyEvent.java.
|
static |
A key has been pressed, excluding auto-repeat-modifier keys.
Definition at line 362 of file KeyEvent.java.
|
static |
A key has been released, excluding auto-repeat-modifier keys.
Definition at line 364 of file KeyEvent.java.
|
static |
Non printable key ranges, currently fixed to an array of size 4.
Not included, queried upfront:
Definition at line 397 of file KeyEvent.java.
|
static |
This value, '\0', is used to indicate that the keyChar is unknown or not printable.
Definition at line 369 of file KeyEvent.java.
|
static |
VK_0 thru VK_9 are the same as UTF16/ASCII '0' thru '9' [0x30 - 0x39].
Definition at line 553 of file KeyEvent.java.
|
static |
See VK_0.
Definition at line 555 of file KeyEvent.java.
|
static |
See VK_0.
Definition at line 557 of file KeyEvent.java.
|
static |
See VK_0.
Definition at line 559 of file KeyEvent.java.
|
static |
See VK_0.
Definition at line 561 of file KeyEvent.java.
|
static |
See VK_0.
Definition at line 563 of file KeyEvent.java.
|
static |
See VK_0.
Definition at line 565 of file KeyEvent.java.
|
static |
See VK_0.
Definition at line 567 of file KeyEvent.java.
|
static |
See VK_0.
Definition at line 569 of file KeyEvent.java.
|
static |
See VK_0.
Definition at line 571 of file KeyEvent.java.
|
static |
VK_A thru VK_Z are the same as Capital UTF16/ASCII 'A' thru 'Z' (0x41 - 0x5A)
Definition at line 595 of file KeyEvent.java.
|
static |
Constant for the Accept or Commit function key, Japanese "kakutei".
ASCII: Record Separator.
Definition at line 494 of file KeyEvent.java.
|
static |
|
static |
Definition at line 865 of file KeyEvent.java.
|
static |
Constant for the All Candidates function key.
Definition at line 893 of file KeyEvent.java.
|
static |
Constant for the Alphanumeric function key.
Definition at line 905 of file KeyEvent.java.
|
static |
Constant for the left ALT function key.
ASCII: device-ctrl-two.
Definition at line 460 of file KeyEvent.java.
|
static |
Constant for the ALT_GRAPH function key, i.e.
right ALT key. ASCII: device-ctrl-three.
Definition at line 463 of file KeyEvent.java.
|
static |
Constant for the "&" key.
Definition at line 523 of file KeyEvent.java.
|
static |
Constant for the "*" key.
Definition at line 535 of file KeyEvent.java.
|
static |
Constant for the equals key, "@".
Definition at line 592 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 597 of file KeyEvent.java.
|
static |
Constant for the "`" key.
Definition at line 663 of file KeyEvent.java.
|
static |
Constant for the back slash key, "\".
Definition at line 651 of file KeyEvent.java.
|
static |
Constant for the BACK SPACE key "\b", matching ASCII.
Printable!
Definition at line 431 of file KeyEvent.java.
|
static |
Constant for the Begin function key.
Definition at line 841 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 599 of file KeyEvent.java.
|
static |
|
static |
Constant for the CAPS LOCK function key.
ASCII: device-ctrl-four.
Definition at line 466 of file KeyEvent.java.
|
static |
Constant for the "^" key.
Definition at line 657 of file KeyEvent.java.
|
static |
Constant for the CLEAR key, i.e.
FORM FEED, matching ASCII.
Definition at line 443 of file KeyEvent.java.
|
static |
Constant for the close bracket key, "]".
Definition at line 654 of file KeyEvent.java.
|
static |
Constant for the Code Input function key.
Definition at line 881 of file KeyEvent.java.
|
static |
Constant for the ":" key.
Definition at line 574 of file KeyEvent.java.
|
static |
Constant for the comma key, ",".
Definition at line 541 of file KeyEvent.java.
|
static |
Constant for the Compose function key.
Definition at line 838 of file KeyEvent.java.
|
static |
Constant for the Context Menu key.
Non printable UTF control.
Definition at line 823 of file KeyEvent.java.
|
static |
Constant for the CTRL function key.
ASCII: device-ctrl-one.
Definition at line 457 of file KeyEvent.java.
|
static |
Constant for the Convert function key, Japanese "henkan".
ASCII: File Separator.
Definition at line 488 of file KeyEvent.java.
|
static |
Definition at line 862 of file KeyEvent.java.
|
static |
Definition at line 861 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 601 of file KeyEvent.java.
|
static |
Numeric keypad decimal separator key.
Non printable UTF control.
Definition at line 790 of file KeyEvent.java.
|
static |
Constant for the DEL key, matching ASCII.
Non printable UTF control.
Definition at line 805 of file KeyEvent.java.
|
static |
|
static |
Constant for the "$" key.
Definition at line 517 of file KeyEvent.java.
|
static |
Constant for the cursor- or numerical pad down arrow key.
Non printable UTF control.
Definition at line 820 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 603 of file KeyEvent.java.
|
static |
Constant for the END function key.
ASCII: End Of Text.
Definition at line 419 of file KeyEvent.java.
|
static |
Constant for the ENTER key, i.e.
CARRIAGE RETURN, matching ASCII. Printable!
Definition at line 446 of file KeyEvent.java.
|
static |
Constant for the equals key, "=".
Definition at line 583 of file KeyEvent.java.
|
static |
|
static |
Constant for the Euro currency sign key.
Definition at line 854 of file KeyEvent.java.
|
static |
Constant for the "!" key.
Definition at line 508 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 605 of file KeyEvent.java.
|
static |
Small UTF/ASCII 'a' thru 'z' (0x61 - 0x7a) - Not used for keyCode / keySym.
Constant for the Fn function keys.
F1..F24, i.e. Fn, are mapped from on 0x60+n -> [0x61 .. 0x78].
Warning: The Fn function keys do collide with unicode characters small 'a' thru 'x'!
See Unicode Collision for details.
Definition at line 677 of file KeyEvent.java.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Constant for the END function key.
ASCII: End Of Transmission.
Definition at line 422 of file KeyEvent.java.
|
static |
Definition at line 866 of file KeyEvent.java.
|
static |
Constant for the Full-Width Characters function key.
Definition at line 923 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 607 of file KeyEvent.java.
|
static |
Constant for the equals key, ">".
Definition at line 586 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 609 of file KeyEvent.java.
|
static |
Constant for the Half-Width Characters function key.
Definition at line 929 of file KeyEvent.java.
|
static |
Constant for the Help function key.
Definition at line 835 of file KeyEvent.java.
|
static |
Constant for the Hiragana function key.
Definition at line 917 of file KeyEvent.java.
|
static |
Constant for the HOME function key.
ASCII: Start Of Text.
Definition at line 416 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 611 of file KeyEvent.java.
|
static |
Constant for the input method on/off key.
Definition at line 875 of file KeyEvent.java.
|
static |
Constant for the INSERT function key.
ASCII: Substitute.
Definition at line 482 of file KeyEvent.java.
|
static |
Constant for the inverted exclamation mark key.
Definition at line 851 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 613 of file KeyEvent.java.
|
static |
Constant for the Japanese-Hiragana function key.
This key switches to a Japanese input method and selects its Hiragana input mode.
Definition at line 943 of file KeyEvent.java.
|
static |
Constant for the Japanese-Katakana function key.
This key switches to a Japanese input method and selects its Katakana input mode.
Definition at line 936 of file KeyEvent.java.
|
static |
Constant for the Japanese-Roman function key.
This key switches to a Japanese input method and selects its Roman-Direct input mode.
Definition at line 950 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 615 of file KeyEvent.java.
|
static |
Constant for the locking Kana function key.
This key locks the keyboard into a Kana layout.
Definition at line 957 of file KeyEvent.java.
|
static |
Constant for the Katakana function key.
Definition at line 911 of file KeyEvent.java.
|
static |
Constant for Keyboard became invisible, e.g.
Android's soft keyboard Back button hit while keyboard is visible.
Definition at line 962 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 617 of file KeyEvent.java.
|
static |
Constant for the cursor- or numerical-pad left arrow key.
Non printable UTF control.
Definition at line 811 of file KeyEvent.java.
|
static |
Constant for the "{" key.
Definition at line 750 of file KeyEvent.java.
|
static |
Constant for the "(" key.
Definition at line 529 of file KeyEvent.java.
|
static |
Constant for the equals key, "<".
Definition at line 580 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 619 of file KeyEvent.java.
|
static |
Constant for the Meta function key.
Definition at line 832 of file KeyEvent.java.
|
static |
Constant for the minus key, "-".
Definition at line 544 of file KeyEvent.java.
|
static |
Constant for the Mode Change (?).
ASCII: Unit Separator.
Definition at line 497 of file KeyEvent.java.
|
static |
Numeric keypad multiply key.
Non printable UTF control.
Definition at line 799 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 621 of file KeyEvent.java.
|
static |
Constant for the Don't Convert function key, Japanese "muhenkan".
ASCII: Group Separator.
Definition at line 491 of file KeyEvent.java.
|
static |
Numeric keypad num lock key.
Non printable UTF control.
Definition at line 808 of file KeyEvent.java.
|
static |
Constant for the "#" key.
Definition at line 514 of file KeyEvent.java.
|
static |
Numeric keypad VK_NUMPAD0 thru VK_NUMPAD9 are mapped to UTF control (0x80 - 0x89).
Non printable UTF control.
Definition at line 769 of file KeyEvent.java.
|
static |
See VK_NUMPAD0.
Definition at line 771 of file KeyEvent.java.
|
static |
See VK_NUMPAD0.
Definition at line 773 of file KeyEvent.java.
|
static |
See VK_NUMPAD0.
Definition at line 775 of file KeyEvent.java.
|
static |
See VK_NUMPAD0.
Definition at line 777 of file KeyEvent.java.
|
static |
See VK_NUMPAD0.
Definition at line 779 of file KeyEvent.java.
|
static |
See VK_NUMPAD0.
Definition at line 781 of file KeyEvent.java.
|
static |
See VK_NUMPAD0.
Definition at line 783 of file KeyEvent.java.
|
static |
See VK_NUMPAD0.
Definition at line 785 of file KeyEvent.java.
|
static |
See VK_NUMPAD0.
Definition at line 787 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 623 of file KeyEvent.java.
|
static |
Constant for the open bracket key, "[".
Definition at line 648 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 625 of file KeyEvent.java.
|
static |
Constant for the PAGE DOWN function key.
ASCII: Vertical Tabulation.
Definition at line 440 of file KeyEvent.java.
|
static |
Constant for the PAGE UP function key.
ASCII: Data Link Escape.
Definition at line 454 of file KeyEvent.java.
|
static |
Definition at line 863 of file KeyEvent.java.
|
static |
Constant for the PAUSE function key.
ASCII: sync-idle.
Definition at line 471 of file KeyEvent.java.
|
static |
Constant for the "%" key.
Definition at line 520 of file KeyEvent.java.
|
static |
Constant for the period key, ".".
Definition at line 547 of file KeyEvent.java.
|
static |
Constant for the "|" key.
Definition at line 752 of file KeyEvent.java.
|
static |
Constant for the "+" key.
Definition at line 538 of file KeyEvent.java.
|
static |
Constant for the Previous Candidate function key.
Definition at line 899 of file KeyEvent.java.
|
static |
|
static |
Definition at line 867 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 627 of file KeyEvent.java.
|
static |
Constant for the equals key, "?".
Definition at line 589 of file KeyEvent.java.
|
static |
Constant for the "'" key.
Definition at line 526 of file KeyEvent.java.
|
static |
Constant for the """ key.
Definition at line 511 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 629 of file KeyEvent.java.
|
static |
Constant for the cursor- or numerical-pad right arrow key.
Non printable UTF control.
Definition at line 817 of file KeyEvent.java.
|
static |
Constant for the "}" key.
Definition at line 754 of file KeyEvent.java.
|
static |
Constant for the ")" key.
Definition at line 532 of file KeyEvent.java.
|
static |
Constant for the Roman Characters function key.
Definition at line 887 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 631 of file KeyEvent.java.
|
static |
|
static |
Constant for the semicolon key, ";".
Definition at line 577 of file KeyEvent.java.
|
static |
Numeric keypad decimal separator key.
Non printable UTF control.
Definition at line 766 of file KeyEvent.java.
|
static |
|
static |
Constant for the forward slash key, "/".
Definition at line 550 of file KeyEvent.java.
|
static |
|
static |
Constant for the Stop function key.
Definition at line 844 of file KeyEvent.java.
|
static |
Numeric keypad subtract key.
Non printable UTF control.
Definition at line 796 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 633 of file KeyEvent.java.
|
static |
Constant for the HORIZ TAB key "\t", matching ASCII.
Printable!
Definition at line 434 of file KeyEvent.java.
|
static |
Constant for the "~" key, matching ASCII.
Definition at line 757 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 635 of file KeyEvent.java.
|
static |
This value, {@value}, is used to indicate that the keyCode is unknown.
Definition at line 411 of file KeyEvent.java.
|
static |
Constant for the "_" key.
Definition at line 660 of file KeyEvent.java.
|
static |
Definition at line 864 of file KeyEvent.java.
|
static |
Constant for the cursor- or numerical-pad up arrow key.
Non printable UTF control.
Definition at line 814 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 637 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 639 of file KeyEvent.java.
|
static |
Constant for the MS "Windows" function key.
It is used for both the left and right version of the key.
Definition at line 829 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 641 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 643 of file KeyEvent.java.
|
static |
See VK_A.
Definition at line 645 of file KeyEvent.java.