# InputAction

> Talos 0.7 · Since 0.6

## Fields

| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
| `kind` | `InputKind` | yes |  | `axis2`, `axis1`, `button` |  |
| `keys` | `string[]` | no |  |  | Key names, in the engine's spelling: a single letter or digit ("W", "5"), "Space", "Return", "Escape", "Tab", "LShift", "LControl", "LAlt" and their "R" twins, "Up"/"Down"/"Left"/"Right", "F1".."F12". How many keys an action takes depends on its kind: axis2 takes four, in WASD order (+y, -x, -y, +x); axis1 takes two, negative then positive ("A", "D" reads -1 on A, +1 on D); button takes any number and ORs them together. An axis takes alternate sets back to back, any of which drives it: ["A", "D", "Left", "Right"] steers on A/D and the arrows, and eight keys move on WASD and the arrows. A key list that is not a whole number of sets binds nothing, which the critic reports as input-unbound. |
| `mouse` | `MouseBinding` | no |  | `delta`, `wheel`, `left`, `right`, `middle` |  |
| `gamepad` | `GamepadBinding` | no |  | `left-stick`, `right-stick`, `dpad`, `south`, `east`, `north`, `west`, `left-bumper`, `right-bumper`, `left-trigger`, `right-trigger`, `left-thumb`, `right-thumb`, `select`, `start`, `mode`, `dpad-up`, `dpad-down`, `dpad-left`, `dpad-right` |  |
| `touch` | `TouchBinding` | no |  |  | A touch-screen source for this action: a screen region and what a finger in it does. Absent: no touch source. |
| `deadzone` | `number` | no | `0` |  | Radial deadzone applied to this action's analogue sources, 0..0.9, before the remainder is rescaled to 0..1 so there is no step at the edge. Keys are digital and never deadzoned. Default 0.15 on axis kinds, 0 on buttons. |
| `sensitivity` | `number` | no |  |  | Keys, sticks, triggers and the wheel: a multiplier on the -1..1 value, after the deadzone (default 1). A stick is a rate: a camera rig turns by it times its yawSpeedDeg/pitchSpeedDeg per second. The mouse `delta`: degrees of turn per pixel (default 0.1). The mouse is an angle, not a rate: a camera turns by pixels × this, once, with no dt and no top speed (ctx.input.axisParts(name).delta). One field serves both, so a map that sets it sets the mouse's degrees per pixel and the stick's multiplier to the same number; the built-in map's look uses 0.1. |
| `toggle` | `boolean` | no | `false` |  | Button kinds only: the action latches on a press and clears on the next press, instead of following the key. Default false. |
