Skip to content
InputForge

Quick Start

This guide walks through setting up InputForge from scratch using only the Inspector — no code required for resource configuration.

Right-click in the FileSystem panel → New Resource → search for InputActionCreate.

Set Action Name to a descriptive string such as MoveAction. Save as MoveAction.tres.

Right-click in the FileSystem panel → New Resource → search for InputMappingContextCreate.

Set Context Name to something descriptive such as GameplayContext. Save as GameplayMappingContext.tres.

Click Mappings → set Size to 1. A new InputMapping entry appears.

  • Set Target Action to your MoveAction.tres
  • Set Input Source to a new InputKey resource
  • Set Input TypeDigital, Axis DimensionAxis2D
  • Assign D / A / S / W to the positive/negative keys

Select your player node in the scene tree. In the Inspector, assign:

  • Gameplay ContextGameplayMappingContext.tres
  • Move ActionMoveAction.tres
public override void _Ready()
{
EnhancedInputSystem.GetInstance().AddContext(GameplayContext);
GameplayContext.BindAction(MoveAction, OnMove);
}
private void OnMove(Vector2 value)
{
_moveInput = value;
}

The key advantage of InputForge is that the InputKey resource is fully decoupled from your code. To switch from WASD to mouse delta, simply change Input Type from Digital to Delta in the Inspector — your OnMove callback receives the new value with zero code changes.

Next: read how the Context Stack lets the same key mean different things in different states, or browse the InputKey reference for every input type.