Interfacing Foot Pedal Using Java

Interfacing a foot pedal device using Java may look hard at first unless you have an idea which event in Java you need to interface it with. Luckily, my friend Junald already was able to sort out the logic behind making the foot pedal work with Java. And it all lay upon the keyboard events.

The foot pedal model I used is the Infinity IN-USB-1 Foot Pedal. It is a 7.5″ x 5.5″ x 1.5″ USB device that can be used to provide input to your PC using the foot. You can press the left, center or right pedals (or any combination of them) to provide input to your PC.

I have provided 3 source files:

FootPedalManager.java – instantiate the class to be able to make your foot pedal device work with your program

FootPedalDispatcher.java – links keyboard events with the foot pedal device

MyClass.java – this is your custom made user interface class where it contains buttons like rewind, forward and play/stop. I will not place the complete code in this class but only part of it that links the keyboard events to the buttons.

Related Posts Plugin for WordPress, Blogger...

14 comments

  1. When you instantiate FootPedalManager, you have to call the addKeyEventDispatcher() event in order to link the ui to the foot pedal device

  2. Hi,
    I am trying to get your code to work with the Infinity IN-USB-2 Foot Pedal. But the Pedal doesn’t seem to generate any thing. Any help would be appreciated 🙂

    1. @alex: hi. did you install the pedal driver? other than that, im not sure. it’s been a long time since i last used the code together with the pedal

      1. Well If I go inside Express Scribe The pedal works fine and the drivers installed on its on when I plugged it in. So I know the pedal does work. I just doesn’t fire anything in Java. :/

  3. provided that the code works with your pedal, the only thing i can think of is if you added the listener?

    other than that sorry, been a long time since i tackled this

  4. I added the KeyEventDispatcher, if thats what you mean. Other then that in the init method you provide the KeyListeners are already added.

Leave a Reply

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