# getKeyBoundToCommand (Client)

> Tells which key runs a command on this client.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Keyboard
- **URL**: https://wiki.mymp.gg/en/getKeyBoundToCommand

## Syntax

```lua
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

```lua
bindKey("F3", "down", "radio")

local key = getKeyBoundToCommand("radio")
if key then
    outputDebugString("Press " .. key .. " to open the radio")
end
```

## See also

- [getBoundKeys (Client)](https://wiki.mymp.gg/en/getBoundKeys.md): Lists the keys bound to a command on this client.
- [getCommandsBoundToKey (Client)](https://wiki.mymp.gg/en/getCommandsBoundToKey.md): Lists the commands bound to a key on this client.
- [bindKey (Shared)](https://wiki.mymp.gg/en/bindKey.md): Binds a key to a function or a command. The function runs when the key is pressed, released or both.
