Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetBindingKey

Last wiki revision 2023-08-13

Returns the keys bound to the given command. key1, key2, ... = GetBindingKey(command)

  • command:The name of the command to get key bindings for (e.g. MOVEFORWARD, TOGGLEFRIENDSTAB)

(Variable returns)

  • key1: - The string representation(s) of all the key(s) bound to this command (e.g. W, CTRL-F)
  • key2:

local command, key1, key2 = GetBinding("MOVEFORWARD") DEFAULT_CHAT_FRAME:AddMessage(BINDING_NAME_MOVEFORWARD .. " has the following keys bound:") if key1 then DEFAULT_CHAT_FRAME:AddMessage(key1) end if key2 then DEFAULT_CHAT_FRAME:AddMessage(key2) end

Even though the default Key Binding window only shows up to two bindings for each command, it is actually possible to bind more using SetBinding, and this function will return all of the keys bound to the given command, not just the first two.

  • GetBinding
  • GetBindingAction
  • GetBindingByKey

Source

https://warcraft.wiki.gg/wiki/API_GetBindingKey · 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.