How-To: Bind Native Input

Goal: handle a NativeInputActions entry (move, look, jump) - in Blueprint with an Enhanced Input event, in C++ by tag with BindNativeAction.

Prerequisites
A UCrimsonInputConfig with NativeInputActions filled and a pawn using UCrimsonInputComponent.

1. Handle the action

In Blueprint you do not need the plugin's binder for native input - place the standard Enhanced Input Action event for your UInputAction and handle it. In C++, BindNativeAction resolves the tag to the action in NativeInputActions, binds it for one ETriggerEvent, and returns the bind handle (or 0 if the tag is missing).

Add the Enhanced Input Action event for the native action (e.g. IA_Move), read Action Value (Axis2D) and call Add Movement Input on Triggered.
Verify
The mapped key drives your handler with the expected value. In C++, a tag missing from NativeInputActions logs a warning and returns handle 0.

2. Remove bindings with RemoveBinds (C++)

When you unpossess or tear down, call RemoveBinds with the handle array. It removes each binding and empties the array.

cpp
CIC->RemoveBinds(NativeBindHandles); // clears every handle it holds

3. Tap / Hold with the press-and-hold trigger

Add UInputTriggerCrimsonPressAndHold to a UInputAction's Triggers array when one action needs Tap / Hold / Toggle behavior. It fires Triggered once on actuation, stays Ongoing while held, and fires Completed only on a real release - so tap and hold are distinguishable, and an ability binding's Completed+Canceled release still fires.

InputAction Details -> Triggers -> add Crimson Press and Hold. No properties to set - it changes the trigger/ongoing/complete timing.
Verify
A tap and a hold on the same action produce distinct behavior, and an ability's released handler still fires when the key is let go.
On the full stack
CrimsonCore binds native input inside GAS abilities - UCrimsonGameplayAbility_BindNativeInput activates once on spawn, calls BindNativeAction, and re-checks the ability's tag requirements per input event. That pattern is only for always-on input (move, look, sprint); discrete actions use normal input-triggered abilities. See Concept: Full-Stack Integration & Multiplayer.

See also

  • How-To: Bind Ability Input - the GAS binders and release semantics.
  • Concept: Full-Stack Integration & Multiplayer - ability-self-binding for native input.