Keystroke emulation

Get help using Construct 2

Post » Thu May 31, 2012 3:52 pm

Greetings! I am hoping to make a GUI using Construct2 that will be controlling a separate application. Well, essentially I am making a virtual version of an ergodesk keyboard. It is really quite simple but I need to be able to emulate a keyboard stroke such that if some one clicks or taps (on a tablet) a particular button, that it will generate a keystroke.

Is there a way to do this in Construct2? I could do this in Processing but I very much want it to be HTML5 while at the same time pushing Construct2 as a great tool for use within my lab.

Thank you in advance.srealist2012-05-31 15:53:10
B
9
S
3
G
4
Posts: 80
Reputation: 3,268

Post » Fri Jun 01, 2012 5:01 am

Here is a quick and dirty (and very incomplete) keyboard. There are two kinds of keys -- standard and special. And Special can be literal (like space is " ") or not, like Return is newline. You'd have to think through cases like Shift, Alt, Ctrl... But it is a start.

keyboard.capx

All I'm doing is appending text. For your application you'll have to figure out what the key codes are and send them as appropriate, and that's the hard part, I guess.kittiewan2012-06-01 05:22:19
B
29
S
11
G
12
Posts: 281
Reputation: 11,888

Post » Sun Jun 03, 2012 1:52 am

Thank you so much! This is a huge help! So greatly appreciate you taking the time to build an example project. :D
B
9
S
3
G
4
Posts: 80
Reputation: 3,268


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 28 guests