Window.onKeyDown

Function/Meaning

The key was pressed

Type
WindowclassEvent
Syntax
onKeyDown(key, shift)
Arguments
key

The value of the virtual key code of the pressed key.

shift

This is the state of shift-type keys and mouse buttons that were pressed at the same time when the keys were pressed.
It is a combination of the following values by bit OR.

  • ssAlt : The ALT key was pressed
  • ssShift : The SHIFT key was pressed
  • ssCtrl : CTRL key was pressed
  • ssLeft : The left mouse button was pressed
  • ssMiddle : The middle mouse button was pressed
  • ssRight : The right mouse button was pressed

Also, if the keyboard is pressed for a long time and key repeat occurs, the following values are also combined.

  • ssRepeat : Key repeat occurred
Return value
None (void)
Explanation

Occurs when a key is pressed.