<?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%3AGetActionsForButtonCombination</id>
	<title>API:GetActionsForButtonCombination - 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%3AGetActionsForButtonCombination"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetActionsForButtonCombination&amp;action=history"/>
	<updated>2026-10-17T13:43:58Z</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:GetActionsForButtonCombination&amp;diff=30332&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:GetActionsForButtonCombination&amp;diff=30332&amp;oldid=prev"/>
		<updated>2026-10-16T19:42:53Z</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=Game}}&lt;br /&gt;
Returns the ids of all actions bound to a given key or button combination.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
actionIds = GetActionsForButtonCombination(deviceId, buttons)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;deviceId : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Input device, for example &amp;lt;code&amp;gt;SystemData.InputDevice.KEYBOARD&amp;lt;/code&amp;gt;.&lt;br /&gt;
;buttons : &amp;lt;code&amp;gt;number-table&amp;lt;/code&amp;gt; – Array of button ids that make up the combination.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;actionIds : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – Array of action ids (&amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt;), indexed from 1. Empty if nothing is bound to the combination.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* A binding matches when its device is &amp;lt;code&amp;gt;deviceId&amp;lt;/code&amp;gt;, it has exactly as many buttons as &amp;lt;code&amp;gt;buttons&amp;lt;/code&amp;gt;, and each of its buttons appears in &amp;lt;code&amp;gt;buttons&amp;lt;/code&amp;gt;. The order of the buttons does not matter.&lt;br /&gt;
* Each action id appears at most once in the result.&lt;br /&gt;
* Use [[API:GetActionNameFromId|GetActionNameFromId]] to turn an id into a name.&lt;br /&gt;
* The stock UI never calls this function.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
A minimal example built from the signature (42 and 29 are the left Shift and left Ctrl ids listed in &amp;lt;code&amp;gt;easystem_utils/source/keyutils.lua&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local ids = GetActionsForButtonCombination( SystemData.InputDevice.KEYBOARD, { 42, 29 } )&lt;br /&gt;
for _, id in ipairs( ids ) do&lt;br /&gt;
    local name = GetActionNameFromId( id )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetBindingsForAction|GetBindingsForAction]]&lt;br /&gt;
* [[API:GetActionNameFromId|GetActionNameFromId]]&lt;br /&gt;
* [[API:GetButtonName|GetButtonName]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>