Setup
Input mapping works with your game's existing Enhanced Input actions. The system uses the core setting framework with specialized components for input.
Enhanced Input Configuration
Mark Actions as Player Mappable
In your Input Mapping Context, bind keys to your Input Actions and mark them as Player Mappable:
- Create your input actions (IA_Jump, IA_Move as 2D Vector, etc.)
- In the Input Mapping Context, bind keys to each action
- For each key binding you want players to rebind:
- Check Player Mappable
- Set a unique Mapping Name (e.g., "Jump", "Move Forward", "Move Backward")
IMC_DefaultControls
├── IA_Jump (Value Type: Digital Bool)
│ └── Space
│ ├── Player Mappable: ✓
│ └── Mapping Name: "Jump"
├── IA_Move (Value Type: Axis2D)
│ ├── W
│ │ ├── Player Mappable: ✓
│ │ ├── Mapping Name: "Move Forward"
│ │ └── Modifiers: Swizzle Input Axis Values (YXZ)
│ ├── S
│ │ ├── Player Mappable: ✓
│ │ ├── Mapping Name: "Move Backward"
│ │ └── Modifiers: Swizzle Input Axis Values (YXZ), Negate
│ ├── A
│ │ ├── Player Mappable: ✓
│ │ ├── Mapping Name: "Move Left"
│ │ └── Modifiers: Negate
│ └── D
│ ├── Player Mappable: ✓
│ └── Mapping Name: "Move Right"
To allow different bindings for keyboard and gamepad on the same action, use different mapping names (e.g., "Jump_KB" for Space, "Jump_GP" for Gamepad Face Button Bottom).
Create Input Setting Type
Create a single Setting Type that will be shared by all input mapping widgets in your game:
- Right-click in Content Browser → Blueprint Class
- Choose Setting Type as parent class
- Name it
Setting_InputMapping - Configure:
- Domain: Player
- Application Strategy: InputSettingApplicationStrategy
- Persistence Strategy: ConfigSettingPersistenceStrategy (or a custom strategy)
- Key Fragment (optional): "Input"
If you've copied widgets from the example project, you may already have this Setting Type and can skip this step.
Add Input Mapping Widget
In your settings menu widget:
- Add
InputMappingSettingWidgetto your UI - Set Setting Type to your
Setting_InputMapping - For each action binding:
- Set Mapping Name to the action name (e.g., "Jump")
- Set Key Slot to "First" for primary binding or "Second" for secondary binding
Example: Create two widgets for Jump - one with Key Slot "First" for primary, another with Key Slot "Second" for alternate.
Key Filtering (Optional)
Restrict which keys can be bound by setting the widget's Key Filter property:
- Input Key Filter - Gamepad - Only allow gamepad buttons
- Input Key Filter - Non Gamepad - Only allow keyboard/mouse
- Custom filters require C++ implementation
See the example project for a complete implementation. For visual display of keys with platform-specific icons, see Key Visualization.