getKeyBoundToFunction
Shared
Tells which key this resource bound a function to.
string|false getKeyBoundToFunction(player thePlayer, function handler)
Parameters
| Name | Type | Description |
|---|---|---|
| thePlayer | player | Server only: the player the bind belongs to. On the client, leave this argument out. |
| handler | function | The function to look for. |
Returns
The name of the first key found, or false if the function is not bound.
Example
local function openMap()
outputDebugString("map")
end
bindKey("F11", "down", openMap)
outputDebugString("Map key: " .. tostring(getKeyBoundToFunction(openMap)))