Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetActionsForButtonCombination

From RoR Wiki
Revision as of 19:42, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Game functions
Version: WAR 1.4.8

Returns the ids of all actions bound to a given key or button combination.

actionIds = GetActionsForButtonCombination(deviceId, buttons)

Arguments

deviceId
number – Input device, for example SystemData.InputDevice.KEYBOARD.
buttons
number-table – Array of button ids that make up the combination.

Returns

actionIds
table – Array of action ids (number), indexed from 1. Empty if nothing is bound to the combination.

Details

  • A binding matches when its device is deviceId, it has exactly as many buttons as buttons, and each of its buttons appears in buttons. The order of the buttons does not matter.
  • Each action id appears at most once in the result.
  • Use GetActionNameFromId to turn an id into a name.
  • The stock UI never calls this function.

Errors

None.

Example

A minimal example built from the signature (42 and 29 are the left Shift and left Ctrl ids listed in easystem_utils/source/keyutils.lua):

local ids = GetActionsForButtonCombination( SystemData.InputDevice.KEYBOARD, { 42, 29 } )
for _, id in ipairs( ids ) do
    local name = GetActionNameFromId( id )
end

See also