How do I supply IsShiftDown from Blueprints the Input Event Structure it needs?

I want to use the [IsShiftDown][1] blueprint component, but I don’t know how to supply it the Input Event Structure (by ref) input node it needs to function.


I recreated what I think it is (in essence) doing with this:


How do I use the standard functionality?

1 Like

I’m not sure how you use the IsShiftDown function, however simply setting your own IsShiftDown bool like you are doing should give the same result (and you won’t need the extra “input” node when you reference your custom bool).

I’m not at my comp with UE4 ATM so I’m afraid I can’t give a more precise answer, but you could also try dragging off from the “input” of the IsShiftDown function and see what results it gives you (with context sensitive on).

Howerver, if you stick with he setup you made, if you need to be sure what you have is working (I don’t know if you have or not), after you set IsShiftDown print a string and connect the return value of the bool (it will automatically be converted) and then you should get a true/false in the top left so you know if it’s working or not.

Sorry I couldn’t be more helpful.

The IsShiftDown function is meant to be an convenient supplementary to use for key-combos (eg SHIFT + X ). In this case you would create an input event for X and do a “branch” with IsShiftDown as bool input.

The Right Shift / Left Shift are input events to be used when you want the user to be able to use this button on it’s own (without key-combo)

Thanks for what you did give. I did test the method I created and it works, but I wanted to learn how to use the built in functionality instead of created this group in every blueprint I need to do this in. If I drag off the input there’s stuff to make a struct, and I get told it’s deprecated. I also tried to figure out how to go from player controller to this but that wasn’t right either.


This does make good sense as a use case for IsShiftDown, but as you can see, the X input event still only has 2 exec nodes as output and I can’t use it to fill the Input node requirement for IsShiftDown. Any ideas on how to do that?

Hi there.

Depending on what you want to do exactly, you can go into your ProjectPreferences>>Input and create an action mapping for your input, wich you can modify to only respond, when shift is being pressed. It doesn’t distinguish left from right Shift, but maybe it helps.

Greetings,
Max

Oh, I guess I misunderstood your question. And you have a good point, I couldn’t find any way to get an InputEvent in Blueprints. However, they exists as C++ (of course) and there are multiple flavors of it. Maybe it’s meant to be used with custom C++ classes? cries for STAFF attention

All you have to do is select the input event node in the event graph, then add appropriate modifiers in the details tab :slight_smile:

191609-blueprint+shift.png

1 Like