ue-input-system

Use this skill when implementing player input with Unreal Engine's Enhanced Input system. Also use when the user mentions 'Enhanced Input', 'input', 'input action', 'InputAction', 'mapping context', 'InputMappingContext', 'input binding', 'key binding', 'input trigger', 'input modifier', 'gamepad',

By quodsoler · 849 installs

npx skills add quodsoler/unreal-engine-skills --skill ue-input-system

Source repository · Upstream listing

UE Input System Target engine: UE 5.8 . APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use". Enhanced Input is the engine's only supported input path. It lives in the EnhancedInput plugin ( Engine/Plugins/EnhancedInput , enabled by default in 5.8); add "EnhancedInput" to PublicDependencyModuleNames in your Build.cs , plus "InputCore" if you touch FKey / EKeys directly and "GameplayTags" if you use input mode filtering or the user settings failure reason containers. The runtime pieces are UEnhancedPlayerInput , UEnhancedInputComponent , UEnhancedInputLocalPlayerSubsystem , the data assets UInputAction / UInputMappingContext , and UEnhancedInputUserSettings for player rebinding. Context Read .agents/ue project context.md if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing. Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code. Request is about… Go to Plugin, module, ini setup [Setup]( setup) Creating actions and mapping contexts [Input Assets]( input assets) Binding handlers in C++ [Binding Actions in C++]( binding actions in c) Which event to bind ( Started vs Triggered vs Completed ) [Trigger Events]( trigger events) Hold, tap, double tap, pulse, chord [Built in Triggers]( built in triggers) Dead zones, sensitivity, WASD→2D, invert Y [Built in Modifiers]( built in modifiers) Adding/removing contexts, priority, split screen [Mapping Contexts and Priority]( mapping contexts and priority) Enabling/disabling contexts by gameplay state [Input Mode Filtering]( input mode filtering) Player key rebinding, settings screens, saving [Runtime Key Rebinding]( runtime key rebinding) Input on actors with no PlayerController [Input Without a PlayerController]( input without a playercontroller) Per platform mapping context swaps [Per Platform Input Data]( per platform input data) Writing a new trigger or modifier [Custom Triggers]( custom triggers), [Custom Modifiers]( custom modifiers) Menus, cursors, CommonUI [UI Input Mode]( ui input mode) Debug overlays [Debugging]( debugging) Full per class parameter tables live in [references/input action reference.md](references/input action reference.md). Setup DefaultInput.ini — point the engine's default classes at Enhanced Input: Enhanced Input project settings live on UEnhancedInputDeveloperSettings (Project Settings → Engine → Enhanced Input), written to DefaultInput.ini under [/Script/EnhancedInput.EnhancedInputDeveloperSettings] . Keys that change C++ behaviour: bEnableUserSettings , UserSettingsClass , DefaultPlayerMappableKeyProfileClass , InputSettingsSaveSlotName , bEnableWorldSubsystem , DefaultWorldInputClass , bEnableInputModeFiltering , DefaultMappingContextInputModeQuery , DefaultInputMode , bEnableDefaultMappingContexts , bSendTriggeredEventsWhenInputIsFlushed . Input Assets UInputAction : UDataAsset — one per logical player action. Properties that change C++ behaviour: Property Default Meaning ValueType EInputActionValueType::Boolean Boolean , Axis1D (float), Axis2D ( FVector2D ), Axis3D ( FVector ) AccumulationBehavior TakeHighestAbsoluteValue Or Cumulative — all mappings sum, so W + S cancel bConsumeInput true Blocks lower priority Enhanced Input mappings on the same keys bConsumesActionAndAxisMappings false Also blocks legacy Action/Axis mappings on those keys bReserveAllMappings false Mappings are not overridden by higher priority contexts bTriggerWhenPaused false Action fires while the game is paused Triggers / Modifiers empty Action level, applied after the per mapping ones PlayerMappableKeySettings nullptr UPlayerMappableKeySettings — makes the action rebindable UInputMappingContext : UDataAsset — key to action bindings, added and removed as a set. Member Notes DefaultKeyMappings FInputMappingContextMappingData ; read the array with GetMappings() MappingProfileOverrides TMap<FString, FInputMappingContextMappingData — per key profile overrides RegistrationTrackingMode Untracked (default) or CountRegistrations InputModeFilterOptions UseProjectDefaultQuery (default), UseCustomQuery , DoNotFilter MapKey(Action, Key) / UnmapKey(Action, Key) Editor/config screen helpers, not a runtime rebinding API HasMappingForInputAction(Action) Search default and profile override mappings Each FEnhancedActionKeyMapping carries Action , Key , per mapping Triggers , Modifiers , a SettingBehavior ( EPlayerMappableKeySettingBehaviors : InheritSettingsFromAction , OverrideSettings , IgnoreSettings ) and an optional PlayerMappableKeySettings override. Reach them with GetPlayerMappableKeySettings() and GetMappingName() . Binding Actions in C++ Handler signatures UEnhancedInputComponent::BindAction returns FEnhancedInputActionEventBinding& and accepts a member function matching one of three native delegate signatures, or a UFUNCTION by name: Signature Handler FEnhancedInputActionHandlerSignature void Handler() FEnhancedInputActionHandlerValueSignature void Handler(const FInputActionValue& Value) FEnhancedInputActionHandlerInstanceSignature void Handler(const FInputActionInstance& Instance) FEnhancedInputActionHandlerDynamicSignature BindAction(Action, Event, Object, FName("OnFirePressed")) FInputActionInstance exposes GetValue() , GetTriggerEvent() , GetElapsedTime() (Started + Ongoing + Triggered), GetTriggeredTime() (Triggered only), GetLastTriggeredWorldTime() , GetTriggers() , GetModifiers() and GetSourceAction() . Lambdas and pollable values: Removing bindings: Trigger Events ETriggerEvent is a bitmask ( ENUM CLASS FLAGS ) describing the trigger state transitions seen this tick. Event Bit State transition Bind it for Triggered 1 << 0 None→Triggered, Ongoing→Triggered, Triggered→Triggered Every active frame; continuous movement Started 1 << 1 None→Ongoing, None→Triggered First frame of evaluation; press once actions Ongoing 1 << 2 Ongoing→Ongoing Held but not yet triggered (charge build up) Canceled 1 << 3 Ongoing→None Released before the trigger condition was met Completed 1 << 4 Triggered→None Release after triggering; stop continuous actions Started always fires before Triggered when both occur on the same tick. Completed does not fire on a tick where any trigger on the action reports Ongoing — split press and release into two actions if you need both reliably. Built in Triggers Per class properties and defaults: [references/input action reference.md](references/input action reference.md). Class Display name Behavior UInputTriggerDown Down Fires every frame the value is actuated (implicit default when an action has no triggers) UInputTriggerPressed Pressed Once on first actuation; holding does not repeat UInputTriggerReleased Released Once when the value drops below ActuationThreshold after actuation UInputTriggerHold Hold After HoldTimeThreshold seconds; bIsOneShot = false keeps firing UInputTriggerHoldAndRelease Hold And Release On release, if held at least HoldTimeThreshold UInputTriggerTap Tap Released within TapReleaseTimeThreshold UInputTriggerRepeatedTap Repeated Tap NumberOfTapsWhichTriggerRepeat taps, each gap under RepeatDelay UInputTriggerPulse Pulse Every Interval seconds while held; TriggerLimit caps the count UInputTriggerChordAction Chorded Action Only while ChordAction is triggered; injects a UInputTriggerChordBlocker into lower priority mappings of the same key ETriggerType decides how triggers combine on one action: Explicit (at least one must fire), Implicit (all must fire), Blocker (blocks everything while IsBlocking returns true). ETriggerEventsSupported ( None , Instant , Uninterruptible , Ongoing , All ) declares which ETriggerEvent s a trigger can ever produce. Built in Modifiers Per mapping modifiers run first, then the action level Modifiers array; each group runs in array order. Class Display name Effect UInputModifierDeadZone Dead Zone Zero below LowerThreshold , remap to 1 at UpperThreshold ; Type = Axial , Radial , UnscaledRadial UInputModifierScalar Scalar Multiply per axis by FVector Scalar UInputModifierScaleByDeltaTime Scale By Delta Time Multiply by frame DeltaTime UInputModifierNegate Negate Invert the axes selected by bX / bY / bZ UInputModifierSwizzleAxis Swizzle Input Axis Values Reorder axes; Order defaults to EInputAxisSwizzle::YXZ UInputModifierSmooth Smooth Rolling average over recent samples UInputModifierSmoothDelta Smooth Delta Smoothed normalized delta; SmoothingMethod , Speed , EasingExponent UInputModifierResponseCurveExponential Response Curve Exponential sign(x) pow(abs(x), CurveExponent) per axis UInputModifierResponseCurveUser Response Curve User Defined One UCurveFloat per axis UInputModifierFOVScaling FOV Scaling Scale by camera FOV for constant angular speed across zoom UInputModifierToWorldSpace To World Space 2D axis → world space WASD → Axis2D ( AccumulationBehavior = Cumulative on the action): W : Swizzle Input Axis Values (YXZ) → Y = +1 S : Swizzle Input Axis Values (YXZ) + Negate (bY) → Y = −1 D : none → X = +1 A : Negate (bX) → X = −1 Gamepad stick : Dead Zone (Radial, LowerThreshold = 0.2) on each stick mapping. Mouse look : Scalar(0.4, 0.4, 1.0) , then Smooth , then FOV Scaling on the mapping. Mapping Contexts and Priority FModifyContextOptions defaults: bIgnoreAllPressedKeysUntilRelease = true , bForceImmediately = false , bNotifyUserSettings = false . The first one already suppresses ghost inputs from keys held across a context switch — do not set it explicitly thinking it is opt in; set it to false only when you deliberately want a held key to carry into the new context. bConsumeInput = true on a UInputAction (the default) means a higher priority context mapping the same physical key blocks every lower priority binding of that key. Use priority plus bConsumeInput to keep modes apart — a vehicle context consuming Spacebar stops the character's Jump action firing while driving. RegistrationTrackingMode on the IMC: Untracked (the first RemoveMappingContext wins, whatever the add count) or CountRegistrations (stays applied until removed as many times as it was added — use it when several systems share one IMC). Each local player owns a separate UEnhancedInputLocalPlayerSubsystem , so split screen contexts never leak between players. Fetch a specific player's subsystem with ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem (LocalPlayer) or ULocalPlayer::GetSubsystemFromController<UEnhancedInputLocalPlayerSubsystem (PlayerController) . Simulate input without a device with InjectInputForAction(Action, RawValue, Modifiers, Triggers) or InjectInputVectorForAction(Action, Value, Modifiers, Triggers) . Input Mode Filtering Gate whole mapping contexts on a gameplay tag state instead of adding and removing them. Requires bEnableInputModeFiltering on UEnhancedInputDeveloperSettings . The subsystem holds the current mode: GetInputMode() , SetInputMode(Tags, Options) , AppendTagsToInputMode , AddTagToInputMode , RemoveTagsFromInputMode , RemoveTagFromInputMode —