# How to use "Get Mapping Contexts" node?

**URL:** <https://forums.unrealengine.com/t/how-to-use-get-mapping-contexts-node/1273776>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [August 26, 2023, 11:42pm UTC](https://forums.unrealengine.com/t/how-to-use-get-mapping-contexts-node/1273776 "2023-08-26T23:42:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bostonDownamics](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bostonDownamics](https://forums.unrealengine.com/u/bostonDownamics)\
**Post date:** [August 26, 2023, 11:42pm UTC](https://forums.unrealengine.com/t/how-to-use-get-mapping-contexts-node/1273776/1 "2023-08-26T23:42:38Z")

</div>

Ok, I’m trying to have a “scene” that is separated from the gameplay.  
I want the “scene” to be modular, so I have a specific Input Mapping Context(IMC) for it.  
To change it:

I want to store all other active IMCs, deactivate them and then add the “scene” IMC.

After I’m done with the “scene” I want to remove the “scene” IMC and reactivate the old ones.

To do that I was trying to use the node “Get Mapping Contexts” to get all other active IMC since I want the “scene” to be modular I won’t be looking for specific a specific IMC like this:

> [@How to change between multiple Input Mapping Contexts?](https://forums.unrealengine.com/t/how-to-change-between-multiple-input-mapping-contexts/1146354):
>
> Hi, I’m kinda new in Unreal Engine 5 and I want to change between multiple input mapping contexts when I possess another character. I already create differents Inputs Actions and assign them to two differents Inputs Mapping Contexts. I have two blueprints characters and I want to switch between them whith the idea of having different inputs [imagen\_2023-04-27\_110509435] And for that I’m using Possess in the Level Blueprint. [image] But that only ch…

The “Get Mapping Contexts” node needs a target input called “Player Mappable Input Config” but I have no idea on how to get this.

---

<div class="post-metadata">

**Author:** ![Rhackam](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rhackam](https://forums.unrealengine.com/u/Rhackam)\
**Post date:** [August 27, 2023, 12:54am UTC](https://forums.unrealengine.com/t/how-to-use-get-mapping-contexts-node/1273776/2 "2023-08-27T00:54:44Z")

</div>

You can get the target by getting the Player Controller and from it get the Enhanced Input Local Player Subsystem like so.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/b/b/bbb8c84a8b2548140854fb35b7f6169c1c5a4c52.jpeg)

---

<div class="post-metadata">

**Author:** ![bostonDownamics](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bostonDownamics](https://forums.unrealengine.com/u/bostonDownamics)\
**Post date:** [August 27, 2023, 1:06am UTC](https://forums.unrealengine.com/t/how-to-use-get-mapping-contexts-node/1273776/3 "2023-08-27T01:06:20Z")

</div>

> [@Rhackam](#):
>
> can get the target by getting the Player Controller and from it get the Enhanced

That doesn’t work, it needs a “Player Mappable Input Config” as a target not an “Enhanced Input Local Player Subsystem”.

 ![Untitled](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/2/502881157076d277fda70cff32d9e659015f7160.png)

---

<div class="post-metadata">

**Author:** ![Rhackam](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rhackam](https://forums.unrealengine.com/u/Rhackam)\
**Post date:** [August 27, 2023, 1:32am UTC](https://forums.unrealengine.com/t/how-to-use-get-mapping-contexts-node/1273776/4 "2023-08-27T01:32:17Z")

</div>

Can’t you get it from the player controller also?

---

<div class="post-metadata">

**Author:** ![bostonDownamics](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bostonDownamics](https://forums.unrealengine.com/u/bostonDownamics)\
**Post date:** [August 27, 2023, 2:04am UTC](https://forums.unrealengine.com/t/how-to-use-get-mapping-contexts-node/1273776/5 "2023-08-27T02:04:38Z")

</div>

I can’t… Even when I untick “Context Sensitive” from the RMB Context Menu the only thing that shows up is a cast for it. But I don’t know what to stick in it anyway.

---

<div class="post-metadata">

**Author:** ![BlackPanda22](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlackPanda22](https://forums.unrealengine.com/u/BlackPanda22)\
**Post date:** [August 27, 2023, 5:46am UTC](https://forums.unrealengine.com/t/how-to-use-get-mapping-contexts-node/1273776/6 "2023-08-27T05:46:50Z")

</div>

From what i can see you can get it from the "Enhanced Input Local Player Subsystem, but im not sure how to guide you from here.  
Hope that helps.

> **[Screenshot](https://prnt.sc/K2Haq4z-otKr)**
>
> Captured with Lightshot

---

<div class="post-metadata">

**Author:** ![Rhackam](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rhackam](https://forums.unrealengine.com/u/Rhackam)\
**Post date:** [August 27, 2023, 11:38am UTC](https://forums.unrealengine.com/t/how-to-use-get-mapping-contexts-node/1273776/7 "2023-08-27T11:38:10Z")

</div>

I don’t think that, for now at least, you can get a list of all the Input Mapping Contexts (IMCs).

`https://docs.unrealengine.com/5.2/en-US/BlueprintAPI/Input/MappingQueries/`

But if the Player always uses the same IMC by default and only the “scene” one is specific and you want that to be modular you could promote the IMC that “scene” uses to a variable, expose it and set it like you want on the different “scenes” you have in your world.

On my current project I have setup a way to switch Pawn. Each possessable Pawn has an Actor Component with this logic in it:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/e/f/3efbfe80441ccd0489ec3a18443bb27ef388c231.png)  
In each Pawn I can set up what IMC to use, and since the default Pawn will always use the Default IMC I don’t have to expose this one.

Hope that helps in some way…

---

<div class="post-metadata">

**Author:** ![bostonDownamics](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bostonDownamics](https://forums.unrealengine.com/u/bostonDownamics)\
**Post date:** [August 27, 2023, 2:01pm UTC](https://forums.unrealengine.com/t/how-to-use-get-mapping-contexts-node/1273776/8 "2023-08-27T14:01:22Z")

</div>

Yeah, that’s what I assumed… I set a simple add context on posses and a remove all contexts on unposses to both of them. Not really modular but it’s minimal.  
I really hope there is a way to get all contexts in the future.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [September 26, 2023, 2:01pm UTC](https://forums.unrealengine.com/t/how-to-use-get-mapping-contexts-node/1273776/9 "2023-09-26T14:01:38Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
