Wowpedia
Advertisement
Wowpedia
240,455
pages
Game Flavors
Links
Patch
Added in 6.0.2 / 1.13.2

Returns the localized string value for the given key and prefix. Essentially a glorified getglobal() function.

text = GetBindingText([key, prefix, abbreviate])

Arguments

key 
string?Optional. Could be nil. - The name of the key (e.g. "UP", "SHIFT-PAGEDOWN")
prefix 
string?Optional. Could be nil. - The prefix of the variable name you're looking for. Usually "KEY_" or "BINDING_NAME_".
abbreviate 
boolean?Optional. Could be nil. - Whether to return an abbreviated version of the modifier keys

Returns

text 
string - The value of the global variable derived from the prefix and key name you specified. For example, "UP" and "KEY_" would return the value of the global variable KEY_UP which is "Up Arrow" in the english locale. If the global variable doesn't exist for the combination specified, it appears to just return the key name you specified. Modifier key prefixes are stripped from the input and added back in to the output.
The third parameter, if true, causes the function to simply substitute the abbreviations 'c', 'a', 's', and 'st' for the strings CTRL, ALT, SHIFT, and STRG (German client only) in the result.

Example

/dump GetBindingText("UP", "KEY_")
> "Up Arrow"

Patch changes

  • Warlords of Draenor Patch 6.0.2 / API (2014-10-14): Added. Replaces the FrameXML version of the same name[1]
Advertisement