(Feature request)Call an input key in C++ or Blueprint

Other than a simple if statement and BeginPlay(), you have to do the Input Map registry; this page goes over this in detail.

I understand that you’re new, but by copy-pasting information you’re not going to learn much. Take this from a person with almost 5 years of UE4 usage. Both here and the forum have proposed doable actions. There is plenty of information online (from Ue4 Documentation. While not clear, it’s enough to understand what you need to do to experiment). Furthermore, we even get access to their Source Code.