WoW:API GetBindingByKey: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(New page: {{wowapi}} GetBindingByKey("key") This returns whatever is bound to "key", be it a spell or an action or a click. If there is no binding, it returns nil (whereas GetBindingAction will re...)
 
mNo edit summary
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
local binding = GetBindingByKey(key)


GetBindingByKey("key")
This returns whatever is bound to "key", be it a spell or an action or a click. If there is no binding it returns nil, unlike [[API GetBindingAction]] which returns a blank string.


This returns whatever is bound to "key", be it a spell or an action or a click. If there is no binding, it returns nil (whereas GetBindingAction will return a blank string).
== Parameters ==
=== Arguments ===
* key (string) - WoW 'key name' of the key to get the binding for, such as an upper case letter like "K"
 
=== Returns ===
* binding (string) - the full binding command string, which is the name of the action that will be taken

Revision as of 06:28, 18 June 2020

WoW API < GetBindingByKey

local binding = GetBindingByKey(key)

This returns whatever is bound to "key", be it a spell or an action or a click. If there is no binding it returns nil, unlike API GetBindingAction which returns a blank string.

Parameters

Arguments

  • key (string) - WoW 'key name' of the key to get the binding for, such as an upper case letter like "K"

Returns

  • binding (string) - the full binding command string, which is the name of the action that will be taken