Keystroke emulation

0 favourites
  • 3 posts
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • Thank you so much! This is a huge help! So greatly appreciate you taking the time to build an example project. :D

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)