Skip to content
InputForge

InputKey

InputKey is the unified input source resource. A single class handles all device types and axis configurations — select what you need from the Inspector dropdowns.

The top-level selector. Determines which fields are shown in the Inspector and how the raw hardware event is interpreted.

ValueDeviceOutput shape
BooleanKey / buttonVector3(1 or 0, 0, 0)
DigitalKeyboard pairVector3(x, y, 0)
AnalogJoystick axisVector3(x, y, 0)
DeltaMouse motionVector3(x, y, 0)
PointerAbsolute cursor positionVector3(x, y, 0)

Captures a single key, gamepad button, or mouse button press. Echo events (OS key-repeat) are filtered automatically.

PropertyDescription
DeviceTypeKeyboard, MouseButton, or JoyButton
KeyboardKeyThe keyboard scancode (visible when DeviceType = Keyboard)
MouseKeyThe mouse button (visible when DeviceType = MouseButton)
GamepadButtonThe gamepad button index (visible when DeviceType = JoyButton)

Output: Vector3(1, 0, 0) while pressed, Vector3(0, 0, 0) on release.


Reads two keyboard keys as a signed axis. Each axis produces values in the range [-1, 1].

PropertyDescription
AxisDimensionAxis1D or Axis2D
PositiveKeyKey that drives the axis toward +1
NegativeKeyKey that drives the axis toward -1
PositiveKeyYY-axis positive key (Axis2D only)
NegativeKeyYY-axis negative key (Axis2D only)

Tip: pair with NormalizeModifier to prevent diagonal movement being ~1.41× faster than cardinal.


Reads one or two joystick axes directly. Raw hardware values are passed through — apply DeadzoneModifier to filter drift.

PropertyDescription
AxisDimensionAxis1D or Axis2D
JoystickAxisThe X (or only) joystick axis
JoystickAxisYThe Y joystick axis (Axis2D only)

Reads mouse motion as a frame delta. Produces a new value each time the mouse moves; returns to zero when the mouse stops.

PropertyDescription
AxisDimensionAxis1D or Axis2D
SensitivityMultiplier applied to the raw delta
IsYAxisRead Y motion instead of X (Axis1D only)

Reads the absolute mouse cursor position in viewport space — distinct from Delta, which reports relative motion. A mouse motion event still has to arrive for the value to update (InputForge stays event-driven, never polling every frame), but the value itself is the live cursor position read from the viewport, not derived from the event’s relative movement.

No Sensitivity or IsYAxis — those are Delta concepts. Output: Vector3(x, y, 0) where x/y are the cursor’s pixel coordinates. Pair with PointerSpaceModifier to reinterpret the raw pixels as screen-relative or rect-relative coordinates.

Use for: cursor-following UI, aim-at-cursor mechanics, anything that needs “where is the pointer” rather than “how much did it move”.