Garry's Mod Wiki

input.GetKeyName

  string input.GetKeyName( number button )

Description

Gets the button name from a numeric button code. The name needs to be translated with language.GetPhrase before being displayed.

Despite the name of the function, this also works for the full range of keys in BUTTON_CODE enum.

Arguments

1 number button
The button, see BUTTON_CODE enum.

Returns

1 string
Button name.