WoW:API SetBinding: Difference between revisions

m
Move page script moved page API SetBinding to WoW:API SetBinding without leaving a redirect
m (Move page script moved page API SetBinding to WoW:API SetBinding without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 18: Line 18:


== Example ==
== Example ==
  -- Removes the default right mouse button binding
  -- Remove all bindings from the right mouse button.
  SetBinding("BUTTON2");
  SetBinding("BUTTON2");
  -- Restores the default behavior for the right mouse button
  -- Restore the default binding for the right mouse button.
  SetBinding("BUTTON2","TURNORACTION");
  SetBinding("BUTTON2","TURNORACTION");


Line 28: Line 28:
* The Key Bindings UI will update immediately should this function succeed. However, bindings are not saved without an explicit {{api|SaveBindings}}() call. Unless saved, bindings will reset on next log-in / bindings load.
* The Key Bindings UI will update immediately should this function succeed. However, bindings are not saved without an explicit {{api|SaveBindings}}() call. Unless saved, bindings will reset on next log-in / bindings load.
* A list of default FrameXML bindings.xml-defined actions is available: [[BindingID]].
* A list of default FrameXML bindings.xml-defined actions is available: [[BindingID]].
* The Addon API doesn't know what the default binding is for any single action. You can set them all to their defaults by calling <code>{{api|LoadBindings}}(DEFAULT_BINDINGS)</code>; this is an all-or-nothing action.


==See Also==
==See Also==
Anonymous user