Added in 1.9.1

$keyval

Returns the key code of the key being pressed.

Only filled during on KEYDOWN, on KEYUP and on CHAR events.

Example

on *:KEYDOWN:*:*:echo -ag $keyval was pressed, the character was $keychar, key repeat was $iif($keyrpt, on, off)