How-To: Add Modifier-Key Chords

Goal: require a modifier (Shift, Ctrl, Alt, a gamepad trigger - any modifier you registered) on an action - e.g. Shift+1 or RT+Y - baked into an IMC and not rebindable by players.

Prerequisites
An UInputMappingContext with the mapping you want to gate, and your chord modifiers registered in Project Settings -> Crimson -> Crimson Input Settings -> Chord Modifiers: one ModifierDefinitions entry per modifier, with a unique Input.Modifier.* tag, its ModifierAction and its FallbackKeys. With no modifiers registered you can still gate on raw keys (step 2).

1. Add the chord trigger to the mapping

Open the IMC and expand the mapping row (Action + Key) you want to gate. Click + on that row's Triggers array and pick Crimson Dynamic Chord - the same place as any Enhanced Input trigger. Expand the new entry to reach its Trigger Settings: Default Chord and, under Rebindable, Mapping Name.

2. Set the default chord, leave Mapping Name empty

Add the modifier tag(s) under Default Chord -> Required Modifiers - the Input.Modifier.* tags you registered in Project Settings -> Crimson -> Crimson Input Settings - or raw keys under Required Modifier Keys if you registered none, and leave Mapping Name at None. That is the entire inline flow - the chord is baked into this IMC mapping.

Exact-match semantics
The chord is an exact match. Shift+1 fires only with Shift held; a mapping whose chord requires no modifiers is blocked while any modifier is held. This lets 1, Shift+1, and Ctrl+1 be three distinct actions on the same key.
Gamepad bypasses chords
Chord checks apply to keyboard/mouse only. Gamepad input always passes the trigger, so a chorded keyboard binding never blocks the equivalent gamepad binding.

3. Apply the mapping context

A purely inline chord works with the vanilla Add Mapping Context. If the IMC also has any rebindable mappings, use Add Mapping Context With Chord Triggers (see How-To: Get the Building Blocks for getting the subsystem) so those get their injected trigger too - it leaves your inline triggers untouched.

Verify
In PIE the action fires only with the required modifier held; the same key with no modifier (or the wrong one) does nothing. Different IMCs can bind the same action with different chords because each trigger carries its own DefaultChord.

See also

  • How-To: Let Players Rebind Chords - make the modifier player-configurable and persisted.
  • Concept: The Chord System - exact-match logic, gamepad bypass, and IMC injection.