Detecting last input method. Using "Key Is ... Key" causes always dirty Blueprint

Hi All,

I’m trying to write a function in the PlayerController that will determine if the last input entered was from a gamepad or was from a keyboard/mouse and pass the boolean result to the Pawn so that I can change some game elements based on what controls the player is using.

I tried to do this using the “Key is Gamepad Key” node in blueprint, but whenever I use that node (or any of the related nodes) the Blueprint always remains dirty after compiling.
It compiles just fine without that, but that set of nodes in particular seems to be causing an issue.

If I just pass the Key struct to the Pawn and call a function in the pawn to do the “Key is Gamepad Key” check, it appears to work, bit it also has the weird side effect of the Pawn blueprint becoming dirty whenever I compile the PlayerController blueprint (but not the other way around).

I feel like I’m running into some bad programming practices here. Is there a better way that I should be doing this?

This is normal. When you change a blueprint that others depend on those other blueprints need to be updated also.

Your practices are valid, at least in this case :wink:

Also having this exact issue.

We get this in 4.13.1 but not if I make a blank project and add to the thirdpersonplayercontroller.

I’ve just run into the same issue (UE4.14). Adding “Key is Gamepad Key” in any BP causes it to be unable to stay compiled. Returning to the graph after turning the BP editor off just makes it uncompiled again. Can you please explain why this issue is marked as solved?