RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Activity ManagerAudio Bank ManagerAudio Ribbon SystemBus Route ManagerCamera SystemCore Chat (IRC)Core CheckpointsCore Command HandlerCoupler Camera ModifierDevices (RGB Peripherals)Dynamic PropsEnvironmentFlowgraph ManagerForestFun StuffGame ContextGame StateGround Marker ArrowsGround MarkersHardware InfoHighscoresHotlappingInventoryJob SystemLap TimesLevelsLoad Map CommandMetricsMod ManagerMultiseatMultiseat CameraMulti SpawnOnlinePaths (Camera Paths)Quick Access (Radial Menu)Recovery PromptRemote ControllerReplayRepositoryRope Visual TestScheme Command ServerCore SnapshotCore SoundsCore TerrainTraffic SignalsTrailer RespawnVehicle Active PoolingVehicle Bridge (GE ↔ VLua Communication)Vehicle MirrorsVehicle PaintsCore VehiclesVehicle TriggersVersion UpdateWeather SystemWindows Console
Input Action FilterInput ActionsInput BindingsInput CategoriesDeprecated ActionsVehicle SwitchingVibration DebugVirtual Input

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionscoreinput

Input Actions

Loads and manages input action definitions from JSON files. Actions define what happens when an input binding triggers (key press, axis movement, etc.), including the command context (vehicle Lua, GE

Loads and manages input action definitions from JSON files. Actions define what happens when an input binding triggers (key press, axis movement, etc.), including the command context (vehicle Lua, GE Lua, etc.) and action map assignment.


Public API

FunctionSignatureDescription
M.getActiveActions() → tableReturns all currently active actions (keyed by unique name). Caches result.
M.upgradeAction(action) → string|nilChecks for deprecated/replaced actions, returns the upgraded name or nil if obsolete/inactive.
M.actionToCommands(actionName, actionCache?) → success, actionMap, ...Converts an action definition into C++ binding parameters (actionMap, onChange/onDown/onUp commands, context, etc.).
M.uniqueNameToName(uniqueActionName, vehicleName) → stringStrips vehicle prefix from a mangled action name.
M.nameToUniqueName(actionName, vehicleName) → stringAdds vehicle prefix to prevent action name collisions (e.g. pickup__myAction).
M.executeCommand(evt, actionValue, vehicleId) → numberExecutes an action command with the given value. Routes to vlua/elua/tlua/bvlua context. Returns 1 on success.
M.triggerDown(actionName)Programmatically triggers a digital action press.
M.triggerUp(actionName)Programmatically triggers a digital action release.
M.triggerDownUp(actionName)Triggers a press followed by release.

Action Definition Format (JSON)

{
  "steering": {
    "cat": "vehicle",
    "ctx": "vlua",
    "onChange": "input.event('steering', VALUE, FILTERTYPE, ANGLE, LOCKTYPE)",
    "isCentered": true,
    "desc": "ui.controls.steering"
  }
}

Command Contexts

ContextConstantTarget
vluaCOMMAND_CONTEXT_VLUAPlayer vehicle Lua
tluaCOMMAND_CONTEXT_TLUAGE/top-level Lua (default)
eluaCOMMAND_CONTEXT_ELUAExtension Lua
bvluaCOMMAND_CONTEXT_BVLUABroadcast to all objects

Action Maps

MapWhen Used
NormalDefault gameplay actions
MenuMenu navigation actions (cat = "menu")
VehicleCommonVehicle Lua context actions
VehicleSpecificPer-vehicle actions (from jbeam inputActions)
MenuIndependent_*Per-action menu-independent maps

Hooks

FunctionDescription
M.onFirstUpdateClears action cache on first frame.
M.onVehicleSwitchedClears action cache (vehicle-specific actions may change).
M.onFileChangedClears cache when action JSON files change.
M.dependenciesTable. Required extensions: {'core_input_categories', 'core_input_deprecatedActions', 'tech_license'}
M.menuActionMapNamesTable. Names of menu action maps.
M.menuIndependentPrefixString. Prefix for menu-independent actions ("MenuIndependent_").

Module State

VariableTypeDefault
dependenciestable{ "core_input_categories", "core_input_deprecat...
menuActionMapNamestable{}

Usage Example

-- Get all active actions
local actions = core_input_actions.getActiveActions()

-- Check if an action exists
local action = core_input_actions.upgradeAction("steering")

-- Programmatically trigger an action
core_input_actions.triggerDownUp("reset_physics")

-- Execute an action command manually
local evt = { ctx = "vlua", onDown = "input.event('horn', 1)" }
core_input_actions.executeCommand(evt, 1, vehicleId)

Key Internals

  • Vehicle-specific actions are read from vehicles/{name}/input_actions*.json and jbeam inputActions.
  • Actions are name-mangled with vehicle name prefix for uniqueness.
  • actionsEnabled from jbeam determines which vehicle actions are usable vs vehicle_specific_unusable.
  • The menuIndependentPrefix is "MenuIndependent_".

See Also

  • Input Action Filter - Related reference
  • Input Bindings - Related reference
  • Input Categories - Related reference
  • Core Systems Guide - Guide

Input Action Filter

Blocks or allows specific input actions by name or group. Used to restrict player actions during missions, scenarios, and specific game states (e.g. disabling vehicle switching during a race).

Input Bindings

Manages input device bindings: reads default + custom bindings from disk, applies diffs, sends to the engine's ActionMap system, handles force feedback (FFB) configuration, device hot-plug, multiseat

On this page

Public APIAction Definition Format (JSON)Command ContextsAction MapsHooksModule StateUsage ExampleKey InternalsSee Also