# Can a Player controller class automatically generate Input binding (project settings)?

**URL:** <https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189>\
**Category:** AI\
**Tags:** unreal-engine, question, key-bind\
**Created:** [August 23, 2020, 8:36am UTC](https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189 "2020-08-23T08:36:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haider\_of\_Sweden](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haider\_of\_Sweden](https://forums.unrealengine.com/u/Haider_of_Sweden)\
**Post date:** [August 23, 2020, 8:36am UTC](https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189/1 "2020-08-23T08:36:29Z")

</div>

Can a Player controller class automatically generate Input binding (project settings)?

Or do I always have to do the bindings manually under Project settings \> Input?

some additional clarification:  
I intend to migrate the character from eg the ContentExamples project to my own project. I like the character, the way it moves, etc.

So I wondered if the bindings, that you can see under Project settings, if they always must be done by hand or if they can be made auto-generated by something else, eg the Player controller (or Game mode, or something else)? Or generated during the migrate process.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 23, 2020, 8:45am UTC](https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189/2 "2020-08-23T08:45:18Z")

</div>

Input binding is an abstraction layer - think shortcuts. The player controller can already process all input. Bindings make it more convenient and flexible to use.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 23, 2020, 8:47am UTC](https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189/3 "2020-08-23T08:47:32Z")

</div>

> So I wondered if the bindings, that  
> you can see under Project settings, if  
> they always must be done by hand or if  
> they can be made auto-generated by  
> something else, eg the Player  
> controller (or Game mode, or something  
> else)? Or generated during the migrate  
> process.

You will need to add them by hand.

---

<div class="post-metadata">

**Author:** ![Haider\_of\_Sweden](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haider\_of\_Sweden](https://forums.unrealengine.com/u/Haider_of_Sweden)\
**Post date:** [August 23, 2020, 9:04am UTC](https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189/4 "2020-08-23T09:04:48Z")

</div>

So no bindings can ever be auto-generated by a blueprint?  
I am looking into the possibilities here, what can be done, what not.

> The player controller can already  
> process all input. Bindings make more  
> it convenient and flexible to use.

But if you don’t have any binding, no input is possible, or am I missing something?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 23, 2020, 9:34am UTC](https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189/5 "2020-08-23T09:34:42Z")

</div>

> But if you don’t have any binding, no  
> input is possible, or am I missing  
> something?

All blueprints have access to all input events from the get go:

![311047-annotation-2020-08-23-103057.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/a/d/1ade038c3fb9c3c363e1df40e01df600add2dbcb.jpeg)

Actors don’t process them by default but this can be overridden. If you do not want to add custom binding, you do not need to.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 23, 2020, 9:37am UTC](https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189/6 "2020-08-23T09:37:15Z")

</div>

You can create your own binding to process Q|E keys that rotate in-game camera, making it quite convenient (top)

![311038-annotation-2020-08-23-103524.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/b/18bb1593c3f0568c7cc4104b398e35c34d5fb13b.jpeg)

Or handle the boolean values yourself and write script to process them manually. Both are useful, depends on what your requirement is.

---

<div class="post-metadata">

**Author:** ![Haider\_of\_Sweden](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haider\_of\_Sweden](https://forums.unrealengine.com/u/Haider_of_Sweden)\
**Post date:** [August 23, 2020, 10:17am UTC](https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189/7 "2020-08-23T10:17:01Z")

</div>

this is how the PlayerCharacter blueprint I have looks like:

 ![311052-ue-character-blueprint.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/e/0fee5897541142c90a03ef6a275604e331bcad9e.jpeg)

This is how it looks like under Project Settings \> Input

 ![311051-ue-input-binding.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/6/4a60d0404150ba94bd82e9094297b35917457790.png)

I had to import the ini-file for the Input part so it worked.  
In other words; if I delete all under Input, I cant move the character anymore. No walking around with WASD and no looking around with the mouse.

Do I understand you correctly, that the Blueprint should be able to let me move around despite nothing is set under Project Setting \> Input? If yes, that’s good for me, but HOW does it work?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 23, 2020, 10:34am UTC](https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189/8 "2020-08-23T10:34:59Z")

</div>

> Do I understand you correctly, that  
> the Blueprint should be able to let me  
> move around despite nothing is set  
> under Project Setting \> Input?

Yes.

In _Project Setting \> Input_ you just define _alternative names_ for the input; as a bonus you get to set the scale - additional data the event will produce. For example: in your 2nd pic _MoveForward_ is using W | S | Up | Down and Left Thumbstick Y - these are native events _already available_ in any blueprint.

But you can make a neat shortcut in the Input Bindings which allows you to use _the snazzy red nodes with fancy names_. Do note that you also have a much more mundane _Left Shift_ in your first pic - it still works fine even though no binding was created in the Input Bindings, right?

* * *

Nothing stops you from doing this in the Player Character (or use the axis equivalents which I’ve shown in the pic earlier on.):

 ![311054-annotation-2020-08-23-112335.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/a/b9ade80f0f10d466b4ef9fc50f384ff874e88101.jpeg)

But defining your own _custom bindings_ for whatever input you need is just more compact, readable and convenient.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 23, 2020, 10:51am UTC](https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189/9 "2020-08-23T10:51:35Z")

</div>

Here’s another example:

![311066-annotation-2020-08-23-114823.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/9/ab99908f7a769fd32ae419c82e4d983d0a60349f.jpeg)

![311067-annotation-2020-08-23-114753.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/c/a/0cad3be43d5f59691d61574b1d05e5a09b9e14ca.jpeg)

They both do the very same thing but having an input binding is more descriptive.

---

<div class="post-metadata">

**Author:** ![Haider\_of\_Sweden](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haider\_of\_Sweden](https://forums.unrealengine.com/u/Haider_of_Sweden)\
**Post date:** [August 23, 2020, 12:03pm UTC](https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189/10 "2020-08-23T12:03:25Z")

</div>

> Do note that you also have a much more  
> mundane Left Shift in your first pic -  
> it still works fine even though no  
> binding was created in the Input  
> Bindings, right?

Yes, the shift does work without any input mapping. Which confused me even more 😃  
I was just about to ask “why?”, when I realized… read below

> Nothing stops you from doing this in  
> the Player Character (or use the axis  
> equivalents which I’ve shown in the  
> pic earlier on.):

Thats a great tip! **Thank you**.  
If I intend to have the character behave and mapped in an certain way, this would render the whole input thing unnecessary, right?

The final check to see if I got it all right:  
You answered “_Yes_” to the question “_the Blueprint should be able to let me move around despite nothing is set under Project Setting \> Input?_”

If you referred to the usage of axis-equivalent nodes, **then aight, got you**. If however you meant that it should work with the InputAction nodes as in my screen capture, then it doesnt work for me. And therefore: why and what should I do to make it work?

I need to make sure if 1) either the blueprint with InputAxis nodes can work by themselves or 2) if blueprints can **auto-generate** input mappings under Project Settings.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 23, 2020, 12:31pm UTC](https://forums.unrealengine.com/t/can-a-player-controller-class-automatically-generate-input-binding-project-settings/470189/11 "2020-08-23T12:31:41Z")

</div>

> If I intend to have the character  
> behave and mapped in an certain way,  
> this would render the whole input  
> thing unnecessary, right?

Setting input binding may seem unnecessary if all you want to do is to press the spacebar to jump - a native event Space Bar → Jump is probably OK.

But it’s convenient to have bindings if you want to do a little bit more with it. Have a look at the custom _MoveUp_ in your example - it’s bound to 6 (!) native events; pressing any of the bound keys / buttons will invoke the same _MoveUp_ action with scale acting as its modifier. Otherwise you’d need to duplicate your script 6 times… or at least wire it 6 times to the same bunch of nodes.

* * *

> […] it should work with the InputAction nodes  
> as in my screen capture, then it  
> doesnt work for me. And therefore: why  
> and what should I do to make it work?

Both should work fine. What key are you using for screen capture and which blueprint is it processed in? Are you using capture key anywhere else? Input consumption is on by default, meaning that a keystroke is processed only once the blueprint that detects it first. But this behaviour can be overridden, too.

Assuming we’re talking about taking screenshots here, placing this in the _Pawn_ or _Controller_ is generally enough:

![311060-annotation-2020-08-23-132849.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/f/5/ff569e3977cc037ed85dcbea9a2cf5e17a4162a2.jpeg)

Providing you do not use the C key for anything else.

* * *

> I need to make sure if 1) either the  
> blueprint with InputAxis nodes can  
> work by themselves or 2) if blueprints  
> can auto-generate input mappings under  
> Project Settings.

There is no such thing as auto-generation for inputs. You either define them yourself to make things more convenient, or use the native ones. If you ever see anything in the input bindings, someone added it manually - perhaps as a part of a template.
