keys.getName
From ComputerCraft Wiki
Revision as of 23:21, 5 May 2013 by Hawk777 (Talk | contribs) (Type-templateify, add nil return value possibility on failure, and clarify description)
Function keys.getName | |
Translates a numerical key code to a human-readable name. The human-readable name is one of the constants in the keys API. | |
Syntax | keys.getName(int code) |
Returns | string the name of the key, or nil if not a valid key code |
Part of | ComputerCraft |
API | keys |
Examples
Example | |
Look up the name of key code 42. | |
Code |
print(keys.getName(42)) |
Output | leftShift |