Announcing Jmulator : an ActionScript 3 library to work with keyboard emulators

This winter, I’m trying something new with my students. I am inviting them to use a keyboard emulator for my physical computing class. It should make it very easy for them to receive physical switch data within their authoring environment (Adobe Flash). And because I want them to focus on the interaction rather than the programming, I created Jmulator, an ActionScript 3 library to simplify even further the usage of keyboard emulators (also know as keyboard encoders) in Flash.

For those who don’t know, a keyboard emulator is a USB or PS2 device which, as its name implies, emulates a regular computer keyboard. The main difference from a real keyboard is that the emulator does not have any keys. Instead, it offers many inputs to which you can connect switches (any on/off switches). A press on the switch therefore sends a keydown/keyup event to the computer. This makes it very easy to use external, physical switches in all sorts of computing environments.

Here is an example board, the I-PAC VE (that’s the board I am currently using):

Photo of the I-PAC VE keyboard encoder

As I said above, in the spirit of trying to make it as simple as possible for my students, I wrote the Jmulator ActionScript library. Here is what version 1.0b offers :

  • All keyboard codes dispatched by the board have already been researched for you. To use the library you simply create an Emulator object and listen for an event matching the label printed on the board itself.
  • It allows you to easily enable or disable the OS typematic feature. Typematic mode is when the OS repeatedly sends key down events when a key is being held down.
  • It allows you to easily listen to only on events, only off events or both on and off events.

So far, the library has only been tested with the I-PAC VE board from Ultimarc. However, I would like to add support for more devices in the future. Adding a new device is very easy. It simply means mapping the board labels to the actual keystrokes being sent to the computer.

By releasing the library publicly, I am hoping that people will help me troubleshoot any issues it might have and provide comments and suggestions for its improvement. The library is available right now for download on the Jmulator project page.

Comments

  1. Hi, I have just completed a “button box” project to use on my PS4 with Project Cars 2 game, basically I used a keyboards circuit board from an old keyboard and bought an enclosure (box) and some buttons (switches), soldered the wire to the board and switches, then tested but plugging into the laptop and tested each switch worked. I would like to make more of these button boxes but use a USB Keyboard emulator, could you suggest a decent one that would work for what I need? Any help is much appreciated. Thanks, Barry

    1. Why not use the one suggested in the article above? It is the I-PAC from Ultimarc. I’ve used it many times with my students and it always worked great. The only drawback is that it does not work on a USB3 port (you have to use USB2).

      1. Hi, the one you show is quite expensive compared to me using a keyboard circuit board. I’ve been looking at the zero delay USB encoder ( https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F282247175861 ) if you could send your email address I could forward a photo of the exact board I’m taking about, but I am not 100% sure if it would work with the PlayStation 4 the same as a keyboard works. If you have any experience with this board let me know.
        Thanks,
        Barry

        1. I don’t know that specific one but I do have experience buying cheaper components from China. They take a long time to arrive and are made of cheaper parts (you can actually tell from the pictures). They are probably going to work and you are probably going to be satisfied. Note, that you will have to buy pigtail-type connectors and wires to hook up your buttons to it (instead of screwing them in like the I-PAC).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.