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

You don’t have to force simulate the switch. You could simply add a switch based on a condition. If Condition [in this case, a specific app is open], then NumLock Runs Tab(). Otherwise, run NumLock().

I’m trying to do it when I press the “Num Lock” key, he calls the “TAB” key as if I pressed “TAB” on the keyboard, because I’m creating a browser for the TVOS platform where the remote control has buttons with command keys arrows, num lock and enter, but the web browser widget requires the TAB key to focus within the buttons on the page and the TVOS control does not have this key. So I chose the Num Lock key which is the “Play / Pause” button on the remote control so that when pressed, it calls the TAB key so that I can interact with the web page and focus on the buttons and links on the site.

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.

You just create functions for what functionality you want to represent.

Anything that you want to run on a Class-World’s Startup must be executed on BeginPlay, the exception being construct script (sets default values).

If it’s variables that you want to set, you could simply set them to a specific value if you know where you’ll be. For example, even though you could have one Character Class and IF break everything, you could Create a Base Character Class with minimal required info, then create two sub classes. If you know your world will start with App A, then run Character_A.

sorry for pestering but I don’t know how to do that, I only work with blueprints, would it be too much to ask if I asked to provide me with the ready-made code for the C ++ player?

It’s the same really, instead of it being a Blueprint Node, it’s a line of Code. In your class, declare functions, and run whatever you need inside BeginPlay. Either way, what you’re asking to do is doable both in BP and C++.

I haven’t found any graph to run a keyboard key call, but I can execute a blueprint c ++ command. But I don’t know which command to execute.

My attempts, but I can’t find anything else, something like calling for the key or linking with an event.

Ehm no not all what I meant. You don’t need to physically set a key. Just switch what you want that key to execute.

EDIT: The Functions in the image are blank functions that I just made as a placeholder. In those functions, do what you like.

Ok, but could you show me the code in c ++ (the text) plz?

The functions

I would need exactly that code but thank you for teaching me how to call it on the blueprint.

I am also on this forum, if you want you can follow it there. Can I simulate a key press event in C++ or Blueprint? - C++ Programming - Unreal Engine Forums

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.

Unfortunately I don’t have time to learn, I’m finishing my projects this week and I don’t intend to touch a development software for the next 5 years that I’ll be in engineering college, I just needed the code, but thanks for taking the time and trying to help me maximum. If you have more ideas you can reply back here or in the forum, every day I will look over there.

Sorry to say, but in my 3 years of unreal engine, the documentation site has never helped me.