Window.onKeyPress

Function/Meaning

[Windows *] characters have been entered

Type
WindowclassEvent
Syntax
onKeyPress(key)
Arguments
key

The entered character.

Return value
None (void)
Explanation

Occurs when characters are entered.
Unlike Window.onKeyDown, onKeyDown handles virtual keycodes, whereas this event handles the characters themselves.
This event does not occur if the key pressed is a key that has nothing to do with the character (such as a function key).
If pressed at the same time as the Ctrl key, the control code shown below will be sent.

  • 0x00 : Ctrl + @
  • 0x01 : Ctrl + A
  • 0x02 : Ctrl + B
  • 0x03 : Ctrl + C
  • 0x04 : Ctrl + D
  • 0x05 : Ctrl + E
  • 0x06 : Ctrl + F
  • 0x07 : Ctrl + G
  • 0x08 : Ctrl + H
  • 0x09 : Ctrl + I
  • 0x0A : Ctrl + J
  • 0x0B : Ctrl + K
  • 0x0C : Ctrl + L
  • 0x0D : Ctrl + M
  • 0x0E : Ctrl + N
  • 0x0F : Ctrl + O
  • 0x10 : Ctrl + P
  • 0x11 : Ctrl + Q
  • 0x12 : Ctrl + R
  • 0x13 : Ctrl + S
  • 0x14 : Ctrl + T
  • 0x15 : Ctrl + U
  • 0x16 : Ctrl + V
  • 0x17 : Ctrl + W
  • 0x18 : Ctrl + X
  • 0x19 : Ctrl + Y
  • 0x1A : Ctrl + Z
  • 0x1B : Ctrl + [
  • 0x1C : Ctrl + \
  • 0x1D : Ctrl +]
  • 0x1E : Ctrl + ^
  • 0x1F : Ctrl + _