x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to emulate a keyboard press.

I'm going to attempt to use UE4 as a simple software delevopment tool.

My first line of ideas requires I know how to emulate a keyboard press. Think of an onscreen keyboard. You press a touch control, and it registers a keyboard press.

I have limited coding knowledge, so preferably blue prints, but if required, a C++ example would do.

Product Version: Not Selected
Tags:
more ▼

asked Sep 28 '15 at 06:57 PM in Blueprint Scripting

avatar image

SatanicOnions
6 1 1 1

avatar image Fernando Montes Jan 28 '16 at 05:41 AM

Has anyone figured out how to do this yet. The answer given isn't what was asked. I want to be able to click a button on a screen and it emulate like a pressed the f key on the keyboard. I dont need to set up what happens when the f key is pressed that is already set up i want to be able to click on screen and mimic like if i had pressed it on the keyboard.

avatar image NiekPixelpool Jun 16 '16 at 07:32 AM

I am looking into this as well. Until now i have not been able to find a decent solution, can you verify if you managed to get it working?

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

In blueprints, you'd capture a keyboard event and then wire up some sort of response to that event. I think what you're really looking for is a way to respond to a key event which doesn't actually happen (simulation of a key event).

your virtual keyboard could detect key presses on it and fire the key events you want. You might even consider using delegates for this.

more ▼

answered Sep 28 '15 at 07:17 PM

avatar image

Slayemin
794 48 29 72

avatar image NiekPixelpool Jun 16 '16 at 08:00 AM

Delegate is not supported for button presses for some reason.

(comments are locked)
10|2000 characters needed characters left

What I really want is a way to output keyboard presses.

So if I hit a touchable button that is bound to the letter T, I want it to produce the letter T

more ▼

answered Sep 28 '15 at 08:46 PM

avatar image

SatanicOnions
6 1 1 1

avatar image Slayemin Sep 28 '15 at 09:33 PM

Again, you'd want to create an event for that. If you press the "T" button on your keyboard, an event fires within the engine. It's up to the game to figure out how to respond to that button press event. Do you move a character? open up a GUI? Add the "T" character to a string? Whether you press a button on a keyboard or use your finger to press a button on a virtual keyboard should make no difference. The key press event gets fired either way and you respond to it somehow.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question