Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetBindingText

Last wiki revision 2022-08-01

Returns the string for the given key and prefix. Essentially a specialized getglobal for bindings. text = GetBindingText([key, prefix, abbreviate])

  • key: - The name of the key (e.g. "UP", "SHIFT-PAGEDOWN")
  • prefix: - The prefix of the variable name you're looking for. Usually "KEY_" or "BINDING_NAME_".
  • abbreviate: - Whether to return an abbreviated version of the modifier keys
  • text: - 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.

/dump GetBindingText("UP", "KEY_")

> "Up Arrow"

Source

https://warcraft.wiki.gg/wiki/API_GetBindingText · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.