【Unreal Engine】Enhanced Input System Fundamentals: Input Action and Mapping Context Setup

Created: 2025-12-12

Basic usage of the Enhanced Input System that became standard in UE5. Covers Input Action and Input Mapping Context roles, input customization with Triggers and Modifiers, and context switching for different scenes.

Why the Enhanced Input System is Needed

The legacy input system (Action Mapping and Axis Mapping) used up to Unreal Engine 4 (UE4) worked well for simple games, but as projects scaled up and input types and supported devices increased, several challenges became apparent.

Main challenges with the legacy input system:

  1. Management Complexity: All input settings were centralized in project settings files, requiring searching through all settings to find which keys were assigned to specific inputs (e.g., "Jump").
  2. Difficulty Switching Contexts: When players switch from "walking mode" to "driving mode," dynamically changing input settings was cumbersome. Manually unbinding and rebinding inputs in code was error-prone.
  3. Lack of Flexibility: Implementing complex input conditions like hold, double-tap, or simultaneous presses required complex logic in Blueprint or C++.

Enhanced Input System introduced in Unreal Engine 5 (UE5) is a more flexible and powerful input management framework designed to solve these challenges.


Main Components of the Enhanced Input System

The Enhanced Input System mainly consists of three assets and one component.

Component NameRoleLegacy System Equivalent
Input Action (IA)Defines abstract actions the player wants to perform (e.g., jump, move, attack). Independent of input devices.Action Mapping / Axis Mapping
Input Mapping Context (IMC)Defines which input devices (keyboard Space key, gamepad A button, etc.) map to which Input Actions.Project Settings Input section
Input Trigger & ModifierDefines input action activation conditions (hold, double-tap, etc.) and input value processing (dead zone, axis inversion, etc.).Didn't exist in legacy system
Enhanced Input ComponentComponent attached to Pawns like player characters to apply IMCs and receive IA events.Legacy Input Component

Key Point: IA separates "what you want to do" and IMC separates "how to do it." This dramatically simplifies input settings management.


Enhanced Input System Implementation Steps

Here we explain the steps to implement basic character movement settings in Blueprint.

Step 1: Create Input Actions (IA)

Create two IAs needed for movement.

  1. Right-click in Content Browser and select Input -> Input Action.
  2. Create IA_Move to receive movement direction input.
    • Set Value Type to Axis2D (Vector2). This receives input in two directions: X-axis (left/right) and Y-axis (forward/back).
  3. Create IA_Jump for jumping.
    • Set Value Type to Digital (Bool).

Step 2: Create Input Mapping Context (IMC)

Next, assign actual keys to the created IAs.

  1. Right-click in Content Browser and select Input -> Input Mapping Context, creating IMC_PlayerControls.
  2. Open IMC_PlayerControls and add mappings with + Mapping.
Input ActionKey / ButtonModifiers
IA_MoveW (Keyboard)Swizzle Input Axis (YXZ)
IA_MoveS (Keyboard)Negate
IA_MoveD (Keyboard)Swizzle Input Axis (YXZ)
IA_MoveA (Keyboard)Negate + Swizzle Input Axis (YXZ)
IA_JumpSpace Bar (Keyboard)None

💡 Modifiers Explained:

  • IA_Move expects Vector2, but keyboard W/S/A/D only output a single axis (Float).
  • W/S needs to map to Y-axis (forward/back), A/D to X-axis (left/right).
  • Swizzle Input Axis Modifiers convert W/S input to Y-axis and A/D input to X-axis.
  • Negate Modifiers invert input values for S key (backward) and A key (left movement).

Step 4: Apply IMC to Player Character

Open the player character Blueprint (e.g., BP_ThirdPersonCharacter) and apply IMC in Event BeginPlay.

// BP_ThirdPersonCharacter (Event Graph)

// 1. Get Player Controller
// 2. Get Subsystem node - select EnhancedInputLocalPlayerSubsystem
// 3. Add Mapping Context (Target: Subsystem, Context: IMC_PlayerControls, Priority: 0)

💡 Getting Enhanced Input Subsystem

Enhanced Input Subsystem is a type of Local Player Subsystem. There is no "Cast to Enhanced Input Player Controller" node. Instead, use the Get Subsystem node and specify EnhancedInputLocalPlayerSubsystem as the subsystem class. After getting the Player Controller, connecting a Get Subsystem node retrieves the Subsystem instance associated with that player.

Step 5: Handle Input Action Events

Finally, handle IA events to move the character.

// BP_ThirdPersonCharacter (Event Graph)

// IA_Move event handling
// 1. Search for IA_Move in Enhanced Input Action Events
// 2. Call Add Movement Input node from Triggered pin
// 3. Break Action Value (Vector2) with Break Vector 2D
// 4. Connect X-axis value to Get Right Vector, Y-axis value to Get Forward Vector, each to Add Movement Input's World Direction
// 5. Connect X-axis/Y-axis values to Add Movement Input's Scale Value

// IA_Jump event handling
// 1. Search for IA_Jump in Enhanced Input Action Events
// 2. Call Jump node from Triggered pin
// 3. Call Stop Jumping node from Completed pin

Triggers and Modifiers

The true value of Enhanced Input lies in Triggers (activation conditions) and Modifiers (input value processing). Combining these lets you define complex input logic in assets without building it in Blueprint or C++.

Input Triggers (Activation Conditions) Examples

TriggerDescriptionUse Case
HeldActivates when key is held for a certain time or longer.Skill charging, hold-to-show menu.
TapActivates when key is quickly pressed and released.Double-tap dash, quick actions.
ChordActivates when multiple keys are pressed simultaneously.L1+R1 combo commands.
DownActivates the moment key is pressed (similar to legacy Action Mapping).Normal attack, jump.

Input Modifiers (Input Value Processing) Examples

ModifierDescriptionUse Case
Dead ZoneSets stick dead zone to ignore unintended input.Gamepad stick operation.
NegateInverts input value (e.g., 1.0 to -1.0).Backward movement, Y-axis inversion for camera.
Swizzle Input AxisSwaps input vector axes (e.g., swap X and Y).Mapping keyboard W/S/A/D input to Vector2.
SmoothAdds smoothness to input values, softening sudden input changes.Camera acceleration/deceleration.

Best Practices and Common Mistakes

✅ Best Practice: Utilizing Contexts

The biggest advantage of Enhanced Input is dynamically switching IMCs.

  • Split IMCs: Split IMCs by game context like "IMC_PlayerControls (basic controls)," "IMC_Driving (driving controls)," "IMC_UI (menu controls)."
  • Priority Settings: When multiple IMCs are active simultaneously (e.g., can operate UI while driving), set priorities in Add Mapping Context node to prevent conflicts. Higher priority IMC mappings take precedence.

❌ Common Mistake: Incorrect Input Action Value Type

If Value Type isn't set appropriately when creating IAs, you won't get intended input values.

  • Digital (Bool): Binary on/off input (keyboard keys, buttons) like jump, attack.
  • Axis1D (Float): Single-axis continuous value input like throttle, triggers.
  • Axis2D (Vector2): Two-axis continuous value input like movement, camera control.

When assigning keyboard W key to an Axis2D IA, W key outputs a Float value (1.0). To map this to Vector2's Y-axis, the Swizzle Input Axis Modifier mentioned earlier is essential. Forgetting this Modifier causes input to not work.

Key Points for Enhanced Input System Usage

Unreal Engine 5's Enhanced Input System is a powerful framework that fundamentally solves legacy input system problems like management complexity and lack of flexibility.

  • Input Action (IA) abstracts "what you want to do," Input Mapping Context (IMC) separates "how to do it."
  • Using Triggers and Modifiers easily defines complex input logic on the asset side.
  • Dynamically switching IMCs easily achieves context-appropriate input management.

For UE5 game development, mastering the Enhanced Input System is the key to building comfortable, maintainable input systems. Be sure to use it in your projects.