Package voltage.core

# Class VoltageKeyPressInfo

java.lang.Object
voltage.core.VoltageKeyPressInfo

public class VoltageKeyPressInfo extends Object
VoltageKeyPressInfo provides information about a key-press event, including the key code of the key that was pressed, the character for that key (if valid), various helper functions to identify specialized key presses like escape, return, etc., and information about what modifier keys were down during the key press (shift, alt, etc.) A VoltageKeyPressInfo object gets passed as the 'object' parameter to Notify() during a Key_Press notification.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VoltageKeyPressInfo(int inKeyCode, int inCharacter, int customCode, int flags)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `GetCharacter()`
  returns the actual character typed ('r', 'R', etc.) as an integer.
  `int`
  `GetKeyCode()`
  returns the key code, which identifies the physical key that got pressed
  `boolean`
  `IsAltKeyDown()`
  Returns true if the alt key was down when the key was pressed.
  `boolean`
  `IsBackspaceKey()`
  returns true if this key press is the backspace key
  `boolean`
  `IsCommandDown()`
  Returns true if the ctrl key was down (on Windows) or the command key was down (on Mac) when the key was pressed.
  `boolean`
  `IsCtrlKeyDown()`
  Returns true if the ctrl key was down when the key was pressed.
  `boolean`
  `IsDeleteKey()`
  returns true if this key press is the delete key
  `boolean`
  `IsDownArrowKey()`
  returns true if this key press is the down-arrow key
  `boolean`
  `IsEndKey()`
  returns true if this key press is the end key
  `boolean`
  `IsEnterKey()`
  returns true if this key press is the main enter (return) key
  `boolean`
  `IsEscapeKey()`
  returns true if this key press is the escape key
  `boolean`
  `IsF10Key()`
  returns true if this key press is the F10 key
  `boolean`
  `IsF11Key()`
  returns true if this key press is the F11 key
  `boolean`
  `IsF12Key()`
  returns true if this key press is the F12 key
  `boolean`
  `IsF13Key()`
  returns true if this key press is the F13 key
  `boolean`
  `IsF14Key()`
  returns true if this key press is the F14 key
  `boolean`
  `IsF15Key()`
  returns true if this key press is the F15 key
  `boolean`
  `IsF16Key()`
  returns true if this key press is the F16 key
  `boolean`
  `IsF17Key()`
  returns true if this key press is the F17 key
  `boolean`
  `IsF18Key()`
  returns true if this key press is the F18 key
  `boolean`
  `IsF19Key()`
  returns true if this key press is the F19 key
  `boolean`
  `IsF1Key()`
  returns true if this key press is the F1 key
  `boolean`
  `IsF20Key()`
  returns true if this key press is the F20 key
  `boolean`
  `IsF21Key()`
  returns true if this key press is the F21 key
  `boolean`
  `IsF22Key()`
  returns true if this key press is the F22 key
  `boolean`
  `IsF23Key()`
  returns true if this key press is the F23 key
  `boolean`
  `IsF24Key()`
  returns true if this key press is the F24 key
  `boolean`
  `IsF25Key()`
  returns true if this key press is the F25 key
  `boolean`
  `IsF26Key()`
  returns true if this key press is the F26 key
  `boolean`
  `IsF27Key()`
  returns true if this key press is the F27 key
  `boolean`
  `IsF28Key()`
  returns true if this key press is the F28 key
  `boolean`
  `IsF29Key()`
  returns true if this key press is the F29 key
  `boolean`
  `IsF2Key()`
  returns true if this key press is the F2 key
  `boolean`
  `IsF30Key()`
  returns true if this key press is the F30 key
  `boolean`
  `IsF31Key()`
  returns true if this key press is the F31 key
  `boolean`
  `IsF32Key()`
  returns true if this key press is the F32 key
  `boolean`
  `IsF33Key()`
  returns true if this key press is the F33 key
  `boolean`
  `IsF34Key()`
  returns true if this key press is the F34 key
  `boolean`
  `IsF35Key()`
  returns true if this key press is the F35 key
  `boolean`
  `IsF3Key()`
  returns true if this key press is the F3 key
  `boolean`
  `IsF4Key()`
  returns true if this key press is the F4 key
  `boolean`
  `IsF5Key()`
  returns true if this key press is the F5 key
  `boolean`
  `IsF6Key()`
  returns true if this key press is the F6 key
  `boolean`
  `IsF7Key()`
  returns true if this key press is the F7 key
  `boolean`
  `IsF8Key()`
  returns true if this key press is the F8 key
  `boolean`
  `IsF9Key()`
  returns true if this key press is the F9 key
  `boolean`
  `IsFastForwardKey()`
  returns true if this key press is the fast-forward key
  `boolean`
  `IsHomeKey()`
  returns true if this key press is the home key
  `boolean`
  `IsInsertKey()`
  returns true if this key press is the insert key
  `boolean`
  `IsLeftArrowKey()`
  returns true if this key press is the left-arrow key
  `boolean`
  `IsNonCharacterKeyCode()`
  returns true if this is a non-character (non-printing) key code such as escape, return, etc.
  `boolean`
  `IsNumberPad0()`
  returns true if this key press is the 0 key on the numeric keypad
  `boolean`
  `IsNumberPad1()`
  returns true if this key press is the 1 key on the numeric keypad
  `boolean`
  `IsNumberPad2()`
  returns true if this key press is the 2 key on the numeric keypad
  `boolean`
  `IsNumberPad3()`
  returns true if this key press is the 3 key on the numeric keypad
  `boolean`
  `IsNumberPad4()`
  returns true if this key press is the 4 key on the numeric keypad
  `boolean`
  `IsNumberPad5()`
  returns true if this key press is the 5 key on the numeric keypad
  `boolean`
  `IsNumberPad6()`
  returns true if this key press is the 6 key on the numeric keypad
  `boolean`
  `IsNumberPad7()`
  returns true if this key press is the 7 key on the numeric keypad
  `boolean`
  `IsNumberPad8()`
  returns true if this key press is the 8 key on the numeric keypad
  `boolean`
  `IsNumberPad9()`
  returns true if this key press is the 9 key on the numeric keypad
  `boolean`
  `IsNumberPadAdd()`
  returns true if this key press is the plus key on the numeric keypad
  `boolean`
  `IsNumberPadComma()`
  returns true if this key press is the comma key on the numeric keypad
  `boolean`
  `IsNumberPadDelete()`
  returns true if this key press is the delete key on the numeric keypad
  `boolean`
  `IsNumberPadDivide()`
  returns true if this key press is the divide key on the numeric keypad
  `boolean`
  `IsNumberPadEquals()`
  returns true if this key press is the equals key on the numeric keypad
  `boolean`
  `IsNumberPadMultiply()`
  returns true if this key press is the multiply key on the numeric keypad
  `boolean`
  `IsNumberPadPeriod()`
  returns true if this key press is the period key on the numeric keypad
  `boolean`
  `IsNumberPadSubtract()`
  returns true if this key press is the minus key on the numeric keypad
  `boolean`
  `IsPageDownKey()`
  returns true if this key press is the page-down key
  `boolean`
  `IsPageUpKey()`
  returns true if this key press is the page-up key
  `boolean`
  `IsPlayKey()`
  returns true if this key press is the play key
  `boolean`
  `IsReturnKey()`
  returns true if this key press is the return (enter) key
  `boolean`
  `IsRewindKey()`
  returns true if this key press is the rewind key
  `boolean`
  `IsRightArrowKey()`
  returns true if this key press is the right-arrow key
  `boolean`
  `IsShiftKeyDown()`
  Returns true if the shift key was down when the key was pressed.
  `boolean`
  `IsSpaceBarKey()`
  returns true if this key press is the space bar
  `boolean`
  `IsStopKey()`
  returns true if this key press is the stop key
  `boolean`
  `IsTabKey()`
  returns true if this key press is the tab key
  `boolean`
  `IsUpArrowKey()`
  returns true if this key press is the up-arrow key

  ### Methods inherited from class java.lang.Object

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

- ## Constructor Details

  - ### VoltageKeyPressInfo

    public VoltageKeyPressInfo(int inKeyCode, int inCharacter, int customCode, int flags)

- ## Method Details

  - ### GetKeyCode

    public int GetKeyCode()
    returns the key code, which identifies the physical key that got pressed

  - ### GetCharacter

    public int GetCharacter()
    returns the actual character typed ('r', 'R', etc.) as an integer. Differs from key codes, which correspond to a particular key, so 'r' and 'R' have the same key code value but different characters, for instance. Not meaningful if IsNonCharacterKeyCode() returns true.

  - ### IsNonCharacterKeyCode

    public boolean IsNonCharacterKeyCode()
    returns true if this is a non-character (non-printing) key code such as escape, return, etc.

  - ### IsSpaceBarKey

    public boolean IsSpaceBarKey()
    returns true if this key press is the space bar

  - ### IsEscapeKey

    public boolean IsEscapeKey()
    returns true if this key press is the escape key

  - ### IsReturnKey

    public boolean IsReturnKey()
    returns true if this key press is the return (enter) key

  - ### IsEnterKey

    public boolean IsEnterKey()
    returns true if this key press is the main enter (return) key

  - ### IsTabKey

    public boolean IsTabKey()
    returns true if this key press is the tab key

  - ### IsDeleteKey

    public boolean IsDeleteKey()
    returns true if this key press is the delete key

  - ### IsBackspaceKey

    public boolean IsBackspaceKey()
    returns true if this key press is the backspace key

  - ### IsInsertKey

    public boolean IsInsertKey()
    returns true if this key press is the insert key

  - ### IsUpArrowKey

    public boolean IsUpArrowKey()
    returns true if this key press is the up-arrow key

  - ### IsDownArrowKey

    public boolean IsDownArrowKey()
    returns true if this key press is the down-arrow key

  - ### IsLeftArrowKey

    public boolean IsLeftArrowKey()
    returns true if this key press is the left-arrow key

  - ### IsRightArrowKey

    public boolean IsRightArrowKey()
    returns true if this key press is the right-arrow key

  - ### IsPageUpKey

    public boolean IsPageUpKey()
    returns true if this key press is the page-up key

  - ### IsPageDownKey

    public boolean IsPageDownKey()
    returns true if this key press is the page-down key

  - ### IsHomeKey

    public boolean IsHomeKey()
    returns true if this key press is the home key

  - ### IsEndKey

    public boolean IsEndKey()
    returns true if this key press is the end key

  - ### IsF1Key

    public boolean IsF1Key()
    returns true if this key press is the F1 key

  - ### IsF2Key

    public boolean IsF2Key()
    returns true if this key press is the F2 key

  - ### IsF3Key

    public boolean IsF3Key()
    returns true if this key press is the F3 key

  - ### IsF4Key

    public boolean IsF4Key()
    returns true if this key press is the F4 key

  - ### IsF5Key

    public boolean IsF5Key()
    returns true if this key press is the F5 key

  - ### IsF6Key

    public boolean IsF6Key()
    returns true if this key press is the F6 key

  - ### IsF7Key

    public boolean IsF7Key()
    returns true if this key press is the F7 key

  - ### IsF8Key

    public boolean IsF8Key()
    returns true if this key press is the F8 key

  - ### IsF9Key

    public boolean IsF9Key()
    returns true if this key press is the F9 key

  - ### IsF10Key

    public boolean IsF10Key()
    returns true if this key press is the F10 key

  - ### IsF11Key

    public boolean IsF11Key()
    returns true if this key press is the F11 key

  - ### IsF12Key

    public boolean IsF12Key()
    returns true if this key press is the F12 key

  - ### IsF13Key

    public boolean IsF13Key()
    returns true if this key press is the F13 key

  - ### IsF14Key

    public boolean IsF14Key()
    returns true if this key press is the F14 key

  - ### IsF15Key

    public boolean IsF15Key()
    returns true if this key press is the F15 key

  - ### IsF16Key

    public boolean IsF16Key()
    returns true if this key press is the F16 key

  - ### IsF17Key

    public boolean IsF17Key()
    returns true if this key press is the F17 key

  - ### IsF18Key

    public boolean IsF18Key()
    returns true if this key press is the F18 key

  - ### IsF19Key

    public boolean IsF19Key()
    returns true if this key press is the F19 key

  - ### IsF20Key

    public boolean IsF20Key()
    returns true if this key press is the F20 key

  - ### IsF21Key

    public boolean IsF21Key()
    returns true if this key press is the F21 key

  - ### IsF22Key

    public boolean IsF22Key()
    returns true if this key press is the F22 key

  - ### IsF23Key

    public boolean IsF23Key()
    returns true if this key press is the F23 key

  - ### IsF24Key

    public boolean IsF24Key()
    returns true if this key press is the F24 key

  - ### IsF25Key

    public boolean IsF25Key()
    returns true if this key press is the F25 key

  - ### IsF26Key

    public boolean IsF26Key()
    returns true if this key press is the F26 key

  - ### IsF27Key

    public boolean IsF27Key()
    returns true if this key press is the F27 key

  - ### IsF28Key

    public boolean IsF28Key()
    returns true if this key press is the F28 key

  - ### IsF29Key

    public boolean IsF29Key()
    returns true if this key press is the F29 key

  - ### IsF30Key

    public boolean IsF30Key()
    returns true if this key press is the F30 key

  - ### IsF31Key

    public boolean IsF31Key()
    returns true if this key press is the F31 key

  - ### IsF32Key

    public boolean IsF32Key()
    returns true if this key press is the F32 key

  - ### IsF33Key

    public boolean IsF33Key()
    returns true if this key press is the F33 key

  - ### IsF34Key

    public boolean IsF34Key()
    returns true if this key press is the F34 key

  - ### IsF35Key

    public boolean IsF35Key()
    returns true if this key press is the F35 key

  - ### IsNumberPad0

    public boolean IsNumberPad0()
    returns true if this key press is the 0 key on the numeric keypad

  - ### IsNumberPad1

    public boolean IsNumberPad1()
    returns true if this key press is the 1 key on the numeric keypad

  - ### IsNumberPad2

    public boolean IsNumberPad2()
    returns true if this key press is the 2 key on the numeric keypad

  - ### IsNumberPad3

    public boolean IsNumberPad3()
    returns true if this key press is the 3 key on the numeric keypad

  - ### IsNumberPad4

    public boolean IsNumberPad4()
    returns true if this key press is the 4 key on the numeric keypad

  - ### IsNumberPad5

    public boolean IsNumberPad5()
    returns true if this key press is the 5 key on the numeric keypad

  - ### IsNumberPad6

    public boolean IsNumberPad6()
    returns true if this key press is the 6 key on the numeric keypad

  - ### IsNumberPad7

    public boolean IsNumberPad7()
    returns true if this key press is the 7 key on the numeric keypad

  - ### IsNumberPad8

    public boolean IsNumberPad8()
    returns true if this key press is the 8 key on the numeric keypad

  - ### IsNumberPad9

    public boolean IsNumberPad9()
    returns true if this key press is the 9 key on the numeric keypad

  - ### IsNumberPadAdd

    public boolean IsNumberPadAdd()
    returns true if this key press is the plus key on the numeric keypad

  - ### IsNumberPadSubtract

    public boolean IsNumberPadSubtract()
    returns true if this key press is the minus key on the numeric keypad

  - ### IsNumberPadMultiply

    public boolean IsNumberPadMultiply()
    returns true if this key press is the multiply key on the numeric keypad

  - ### IsNumberPadDivide

    public boolean IsNumberPadDivide()
    returns true if this key press is the divide key on the numeric keypad

  - ### IsNumberPadComma

    public boolean IsNumberPadComma()
    returns true if this key press is the comma key on the numeric keypad

  - ### IsNumberPadPeriod

    public boolean IsNumberPadPeriod()
    returns true if this key press is the period key on the numeric keypad

  - ### IsNumberPadEquals

    public boolean IsNumberPadEquals()
    returns true if this key press is the equals key on the numeric keypad

  - ### IsNumberPadDelete

    public boolean IsNumberPadDelete()
    returns true if this key press is the delete key on the numeric keypad

  - ### IsPlayKey

    public boolean IsPlayKey()
    returns true if this key press is the play key

  - ### IsStopKey

    public boolean IsStopKey()
    returns true if this key press is the stop key

  - ### IsFastForwardKey

    public boolean IsFastForwardKey()
    returns true if this key press is the fast-forward key

  - ### IsRewindKey

    public boolean IsRewindKey()
    returns true if this key press is the rewind key

  - ### IsShiftKeyDown

    public boolean IsShiftKeyDown()
    Returns true if the shift key was down when the key was pressed.

  - ### IsCtrlKeyDown

    public boolean IsCtrlKeyDown()
    Returns true if the ctrl key was down when the key was pressed.

  - ### IsAltKeyDown

    public boolean IsAltKeyDown()
    Returns true if the alt key was down when the key was pressed.

  - ### IsCommandDown

    public boolean IsCommandDown()
    Returns true if the ctrl key was down (on Windows) or the command key was down (on Mac) when the key was pressed.