Search
Key Members
Constructors Fields Methods
 


Represents a key in the keyboard.

The following tables list the members exposed by the Key type.

 Public Constructors

  Name Description

Key

 

 Public Fields

  Name Description

ALT

The Alt virtual key (key code = 18).

ALT_GR

 

BACK_SPACE

The Backspace virtual key.

CAPS_LOCK

The Caps Lock virtual key.

CONTEXT

The context menu virtual key.

CTRL

The Control virtual key (key code = 17).

DELETE

The Delete virtual key.

END

The End virtual key.

ENTER

The Enter virtual key (key code = 13).

ESC

The Escape virtual key.

F1

The F1 virtual key.

F10

The F10 virtual key.

F11

The F11 virtual key.

F12

The F12 virtual key.

F2

The F2 virtual key.

F3

The F3 virtual key.

F4

The F4 virtual key.

F5

The F5 virtual key.

F6

The F6 virtual key.

F7

The F7 virtual key.

F8

The F8 virtual key.

F9

The F9 virtual key.

HOME

The Home virtual key.

INSERT

The Insert virtual key.

KEY_DOWN

The Down arrow virtual key.

KEY_LEFT

The Left arrow virtual key.

KEY_RIGHT

The Right arrow virtual key.

KEY_UP

The Up arrow virtual key.

LANG

Language rotation virtual key.

NUM_5

The numpad 5 virtual key.

NUM_DELETE

The numpad Delete virtual key.

NUM_DIV

The numpad / virtual key.

NUM_DOWN

The numpad Down arrow virtual key.

NUM_END

The numpad End virtual key.

NUM_HOME

The numpad Home virtual key.

NUM_INSERT

The numpad Insert virtual key.

NUM_LEFT

The numpad Left arrow virtual key.

NUM_LOCK

The Num Lock virtual key.

NUM_MINUS

The numpad - virtual key.

NUM_MULT

The numpad * virtual key.

NUM_PAGEDOWN

The numpad Page Down virtual key.

NUM_PAGEUP

The numpad Page Up virtual key.

NUM_PLUS

The numpad + virtual key.

NUM_RIGHT

The numpad Right arrow virtual key.

NUM_UP

The numpad Up arrow virtual key.

PAGE_DOWN

The Page Down virtual key.

PAGE_UP

The Page Up virtual key.

PAUSE_BREAK

The Pause / break virtual key.

PRTSCR

The Print Screen virtual key.

SCROLL_LOCK

The Scroll Lock virtual key.

SHIFT

The Shift virtual key (key code = 16).

SPACE

The Space virtual key.

TAB

The Tab virtual key.

WINDOWS

The Windows virtual key.

 Protected Fields

  Name Description

content

 

isLocked

 

 Public Methods

  Name Description

clone

Clones this key.

equals

Returns a value indicating whether this instance and a specified Key object represent the same value.

getContent

Gets the key's text content. Some descendant key classes send their content as input to currently focused control; other ones only store their labels in it.

getHeight

Gets the key's height.

getImage

 

getImagePath

Gets relative path to an image that should be displayed inside this key.

getIsLocked

Gets whether a mode associated with a modifier key is enabled.

getLeft

Gets the horizontal position of the key.

getTop

Gets the vertical position of the key.

getWidth

Gets the key's width.

hashCode

Returns a hash code for this Key.

send

Sends this key to the foreground window.

setContent

Sets the key's text content. Some descendant key classes send their content as input to currently focused control; other ones only store their labels in it.

setHeight

Sets the key's height.

setImage

Overloaded.  

setIsLocked

Sets whether a mode associated with a modifier key is enabled.

setLeft

Sets the horizontal position of the key.

setTop

Sets the vertical position of the key.

setWidth

Sets the key's width.

updateKey

Updates the key's labels for current language.

 Protected Methods

  Name Description

copy

Copies the properties of this key to specified one.

 See Also