Number - 1 if the binding should be saved to the currently loaded binding set (default), or 2 if to the alternative.
Flag - 1 if the binding has been changed successfully, nil otherwise.
-- Remove all bindings from the right mouse button.
-- Restore the default binding for the right mouse button.
There are two binding sets: per-account and per-character bindings; of which one may be presently loaded (LoadBindings). You may look up which one is currently loaded using GetCurrentBindingSet().
A single binding can only be bound to a single command at a time, although multiple bindings may be bound to the same command. The Key Bindings UI will only show the first two bindings, but there is no limit to the number of keys that can be used for the same command.
The Key Bindings UI will update immediately should this function succeed. However, bindings are not saved without an explicit 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.
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 LoadBindings(DEFAULT_BINDINGS); this is an all-or-nothing action.