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

I am inexperienced in C ++, could you give me more instructions? Okay, I created a public player class in C ++ and I must add this argument to the command line, but I want the command to be executed immediately when the game opens.