Coldwave Read the docs

Protocol: input#

The input commands a program sends to a running game, as the engine describes them: what each takes, what it answers and what it does. Back to all commands.

input.set#

input.set {player: integer, action: text, value: number} -> {player: integer, action: text, value: number} · write

Holds one player's value for an input action until it is set again.

ParametersTypeMeaning
playerintegerThe player, counting from 0.
actiontextAn input action name, as game.info lists them.
valuenumberAn axis from -1 to 1, or a button: 1 held, 0 released. A value outside -1 to 1 is refused.
ResultTypeMeaning
playerintegerThe player.
actiontextThe action.
valuenumberThe value now held.

input.keys#

input.keys {} -> {keys: [record], names: [record], pointer: record, fingers: [record]} · read, read-only

Lists the keys the project binds to input actions, and every key name the engine knows.

ResultTypeMeaning
keys[record]One {action, player, key, negative, positive} per binding, as the project file writes them under [input.keys]. A binding that names a gamepad's button or stick is read from the pad with the player's number. A button has key (the action is 1 while it is down) and null for the other two; an axis has negative and positive (-1 and 1 while each is down) and null for key. A name is given as written, also one that is not a key.
names[record]Every key name there is, one {name, code}: name is what a project file writes ("A" to "Z", "0" to "9", "Space", "Enter", "Tab", "Escape", "Left", "Right", "Up", "Down", and the pointer's buttons "MouseLeft", "MouseRight", "MouseMiddle"; a finger on a touch screen is "MouseLeft"; a gamepad's sixteen buttons "PadA" to "PadRight"; and last the four directions of its sticks, "PadLeftX", "PadLeftY", "PadRightX", "PadRightY", each an axis by itself with right and up as 1) and code is what a browser reports for that key in KeyboardEvent.code ("KeyA", "Digit0", "Space", "ArrowLeft"; a button's code is its name).
pointerrecordThe {x, y, player} the project writes as pointer under [input]: the two actions that are told where the pointer (the mouse, or a finger) is, x from -1 at the frame's left edge to 1 at its right and y from -1 at its bottom to 1 at its top, and the player they are set for. null when the project names none. A client moves the pointer with input.set on those two actions.
fingers[record]One {region, x, y, press, player} per finger slot the project writes as fingers under [input], in the order a finger looks for a free slot: region {x, y, w, h} is the part of the frame a finger takes the slot in, in the units of the pointer's place (-1 to 1, y up); x and y are the actions that hold the slot's finger's place, press the action that is 1 while it is down. Empty when the project has none. A client plays a finger with input.set on those three actions.

input.history#

input.history {} -> {step: integer, seed: integer, recording: text, tuning: [record], edits: [integer]} · read, read-only

Returns the input of every step so far in the form a project file records it, to save and replay.

ResultTypeMeaning
stepintegerHow many fixed steps have run.
seedintegerThe seed the session started from; a replay needs the same one.
recordingtextThe whole key as a project file writes it under [input], from recording = [ to the closing ], after a saves line when the session started from saves: paste it there as it is, or save it alone in a file for frost run --input and for recording = "run.toml". With it and the seed, frost run reaches this step with this checksum, unless world.set or script.reload changed the game on the way.
tuning[record]One {step, name, value} per tuning value set since the game was loaded, in order; one set before the game was loaded again is at step 0. Empty for a game on the project's own values. A replay sets them again: frost run --set tuning.NAME=VALUE for those at step 0, tuning.set at its step for one set later.
edits[integer]The step count at each change a client made to the game that is not input (a write to the world, scene.load, saves.set, debug.evaluate), oldest first, on the line of time the game is on: one made after a snapshot that game.restore put back is not here. The recording does not hold them: a replay of it goes another way from the first of these steps on. Empty when the recording is the whole of the run.

Generated from Coldwave 0.0.1 r289, 2026-11-30 by the binary itself: do not edit by hand.