<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ARemoveBinding</id>
	<title>API:RemoveBinding - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ARemoveBinding"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:RemoveBinding&amp;action=history"/>
	<updated>2026-10-17T08:25:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:RemoveBinding&amp;diff=30660&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:RemoveBinding&amp;diff=30660&amp;oldid=prev"/>
		<updated>2026-10-16T19:48:04Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Bindings}}&lt;br /&gt;
Removes one key or button binding from a keyboard action.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RemoveBinding(action, deviceId, buttons)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;action : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of the action.&lt;br /&gt;
;deviceId : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Input device of the binding to remove (a &amp;lt;code&amp;gt;SystemData.InputDevice&amp;lt;/code&amp;gt; value).&lt;br /&gt;
;buttons : &amp;lt;code&amp;gt;number-table&amp;lt;/code&amp;gt; – Array of button IDs of the binding to remove, starting at index 1.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The binding is only removed when the action has a binding with exactly this device and these buttons, in the same order. Pass back the &amp;lt;code&amp;gt;deviceId&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;buttons&amp;lt;/code&amp;gt; that were read from the binding, as the stock UI does.&lt;br /&gt;
* If &amp;lt;code&amp;gt;action&amp;lt;/code&amp;gt; is not a known action, or no binding matches, nothing happens and no error is raised.&lt;br /&gt;
* Entries equal to &amp;lt;code&amp;gt;65535&amp;lt;/code&amp;gt; (0xFFFF) in &amp;lt;code&amp;gt;buttons&amp;lt;/code&amp;gt; are skipped.&lt;br /&gt;
* When a binding is removed, &amp;lt;code&amp;gt;SystemData.Events.KEYBINDINGS_UPDATED&amp;lt;/code&amp;gt; is raised.&lt;br /&gt;
* The function needs at least three arguments and only reads the last three.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None besides the generic &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; message when an argument has the wrong type.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Clearing the shown bindings of an action, from &amp;lt;code&amp;gt;default/ea_keymappingwindow/source/keymappingwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for keyIndex=1, MAX_SHOWN_BINDINGS&lt;br /&gt;
do&lt;br /&gt;
    local boundKeyData = KeyMappingWindow.actionsData[ actionIndex ][&amp;quot;keys&amp;quot;..keyIndex]&lt;br /&gt;
    RemoveBinding( action, boundKeyData.deviceId, boundKeyData.buttons)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:AddBinding|AddBinding]]&lt;br /&gt;
* [[API:RemoveAllBindings|RemoveAllBindings]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>