Lua:Input

Lua:Input

From BeamNG

Contains Attributes and functions for controlling input.

File location: lua\vehicle\input.lua

Attributes

table keys = {} -- TODO: REMOVE
table rawDevices = {}
table raw = {}
table state = {}
number VALUETYPE_KEYBD  = 0
number VALUETYPE_PAD    = 1
number VALUETYPE_DIRECT = 2
number parkingbrake = 0 -- legacy support for the console (initial values)

Member Functions

nil init ()
nil update (dt)
-- deviceInst : Device instance: joystick0, joystick1, etc
-- fValue : Value typically ranges from -1.0 to 1.0, but doesn't have to. - It depends on the context.
-- fValue2, fValue3, fValue4 : Extended float values (often used for absolute rotation Quat)
-- iValue : Signed integer value
-- action : InputActionType
-- deviceType : InputDeviceTypes
-- objType : InputEventType
-- objInst : InputObjectInstances
-- ascii : ASCII character code if this is a keyboard event.
-- modifier : Modifiers to action: SI_LSHIFT, SI_LCTRL, etc.
nil processRawEvent (deviceInst, fValue, fValue2, fValue3, fValue4, iValue, action, deviceType, objType, objInst, ascii, modifier)
nil mapsReloaded ()
nil reset ()
nil event (itype, ivalue, inputType)
nil toggleEvent (itype, ivalue, inputType)
nil toggleParkingbrake ()

Public Interface

  • update
  • init
  • reset
  • toggleParkingbrake
  • processRawEvent
  • mapsReloaded
  • event
  • toggleEvent