Simulate keyboard as an action

Get help using Construct 2

Post » Fri Feb 17, 2017 8:21 am

I want to simulate a keypress as an action.
On Left button clicked on "Sprite" -> Simulate "Fn"+"F12"
Is there any way to do this, or are there any plug-ins? I appreciate all responses, thanks in advance.
-K
B
8
S
1
Posts: 39
Reputation: 542

Post » Fri Feb 17, 2017 8:25 am

you could do a sub event
Image
B
25
S
14
G
12
Posts: 290
Reputation: 9,402

Post » Fri Feb 17, 2017 8:27 am

Would that allow the keyboard to be simulated as an action, or wouldn't that just be a new condition?
-K
B
8
S
1
Posts: 39
Reputation: 542

Post » Fri Feb 17, 2017 8:48 am

@Klungland

C2 doesn't have anything built in to do this, so you might want to see if there is a way to do it in JavaScript and use the Browser plugins Execute JavaScript action.

I believe this has been asked before, so a search of the forums might find the answer.

EDIT - Found this: viewtopic.php?f=183&t=168700&hilit=Keypress
Last edited by OddConfection on Fri Feb 17, 2017 8:55 am, edited 1 time in total.
Find all the Construct 2 games that were on Steam Greenlight here
B
33
S
9
G
7
Posts: 451
Reputation: 6,782

Post » Sat Feb 18, 2017 10:59 am

Thanks, I appreciate the answers.
-K
B
8
S
1
Posts: 39
Reputation: 542

Post » Mon Feb 20, 2017 6:48 pm

Klungland wrote:Would that allow the keyboard to be simulated as an action, or wouldn't that just be a new condition?

i suppose your right but it could still work if you added a variable for what button pressed you might be able to do this
Image
B
25
S
14
G
12
Posts: 290
Reputation: 9,402


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests