getKeyBoundToCommand
Client
Tells which key runs a command on this client.
string|false getKeyBoundToCommand(string command)
Parameters
| Name | Type | Description |
|---|---|---|
| command | string | The command's name. |
Returns
The name of the first key found, or false if no key runs the command.
It looks through the command binds of every client resource.
Example
bindKey("F3", "down", "radio")
local key = getKeyBoundToCommand("radio")
if key then
outputDebugString("Press " .. key .. " to open the radio")
end