---
title: Enhanced Input
source: https://dev.epicgames.com/documentation/en-us/unreal-engine/enhanced-input-in-unreal-engine
version: Unreal Engine 5.8 Documentation
fetched: 2026-10-11
note: 原文摘录（英文），供 wiki 引用；非全文
---

# Enhanced Input

- Upgrade path from UE4 default input; radial dead zones, chorded actions, contextual input, prioritization, asset-based extensible processing. Enabled by default.
- Mapping Contexts can be added/removed at runtime (CTRL: crouch while walking, slide while sprinting, stand while prone).
- Four concepts: Input Actions, Input Mapping Contexts, Input Modifiers, Input Triggers.
- Input Actions: data assets, the communication link with code; represent something the user can do. Value types: bool, Axis1D (float), Axis2D (FVector2D), Axis3D (FVector).
- Trigger States/Events: Triggered, Started, Ongoing, Completed, Canceled. C++: UEnhancedInputComponent::BindAction(Action, ETriggerEvent::Triggered, this, &Func); FInputActionInstance::GetValue().Get<T>().
- Mapping Contexts: collection of actions for a context; Action → keys → triggers/modifiers; applied via Enhanced Input Local Player Subsystem with priority; highest priority context wins for same action... vehicle context added/removed on enter/exit; mutually-exclusive contexts avoid collisions. Example code: TSoftObjectPtr<UInputMappingContext>; AddMappingContext(InputMapping.LoadSynchronous(), Priority).
- Modifiers: pre-processors altering raw values before triggers (axis order, dead zones, world space, sensitivity, smoothing). UInputModifier::ModifyRaw_Implementation; access UPlayerInput → Player Controller. Lyra aim inversion example. WASD: W Swizzle (YXZ/ZXY), A Negate, S Negate+Swizzle, D none.
- Triggers: decide whether input activates action; minimum actuation, taps, holds, press/release; Chorded Action triggered with another action. By default any activity triggers every tick. Types Explicit / Implicit / Blocker; logic: no implicits/explicits → fires unless 0; explicits → at least one; implicits → all; blockers override → fail. States None/Ongoing/Triggered. Custom via UInputTrigger or UInputTriggerTimedBase (never returns Triggered itself); UInputTriggerHold (HoldTimeThreshold=1.0, bIsOneShot).
- Player Mappable Input Config: preset collection of contexts (Default / Southpaw).
- Debug: showdebug enhancedinput; showdebug devices. Inject: Input.+key Gamepad_Left2D X=0.7 Y=0.5; InjectInputForAction.
- Platform Settings: UEnhancedInputPlatformData mapping context redirects per platform; in DefaultInput.ini, hot fixable.
