Schemas / I/O

rig.input.buttons

v0.31.0 · draft 7 fields 0 required

Fields

FieldTypeMeaning
player int optional Optional. Player index (0-based); absent = 0
left bool optional Optional. Left / west; absent = false
right bool optional Optional. Right / east; absent = false
up bool optional Optional. Up / north; absent = false
down bool optional Optional. Down / south; absent = false
o bool optional Optional. Primary action (O / A / confirm); absent = false
x bool optional Optional. Secondary action (X / B / cancel); absent = false

Logical button state for one player. Format when present.

Compose rig.meta.named for a label. Portable state only - device handles, keybinds, and edge/pulse caches stay in the host.

Hosts poll hardware into these fields during Update. A common layout is a d-pad plus two face buttons; hosts may map more buttons through extension components.

JSON Schema

Resolves at https://rig.works/schemas/rig.input.buttons.schema.jsonraw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.input.buttons.schema.json",
  "title": "rig.input.buttons",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "player": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "left": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    },
    "right": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    },
    "up": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    },
    "down": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    },
    "o": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    },
    "x": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    }
  }
}