keys

The Keys API provides a table of numerical codes corresponding to keyboard keys, suitable for decoding key events.

These values are not guaranteed to remain the same between versions. It is recommended that you use the constants provided by this file, rather than the underlying numerical values.

getName(code)Translates a numerical key code to a human-readable name.
getName(code)Source

Translates a numerical key code to a human-readable name. The human-readable name is one of the constants in the keys API.

Parameters

  1. code number The key code to look up.

Returns

  1. string | nil The name of the key, or nil if not a valid key code.

Usage