Experimental Foot Pedal Computer Interface

By Jeremy S. Cook

Freelance Tech Journalist / Technical Writer, Engineering Consultant

Jeremy Cook Consulting

May 16, 2022


The vast majority of computer control is done by hand, using a keyboard, mouse, or touchscreen, but what about your feet? They’re perfectly capable of tapping out a signal, but generally sit unused when at a computer. In my latest experiment, I set out to see if common spring-loaded foot pedals would work as a computer interface, perhaps for controlling shift, control, or other modifier keys. Short answer: yes, it can work. There are, however, a few complications.

The Setup:

Image Credit: Jeremy Cook

Pedals used here connect using the venerable ¼ inch mono jack, which acts as a simple on/off switch. It’s straightforward to interface such a pedal with a microcontroller for HID functionality, and I made a custom PCB to adapt it to my JC Pro Macro 2 keypad’s broken out GPIO pins. Code for the setup is found here, and uses the foot pedals in the same manner as standard buttons.

Multi-Keyboard MacOS Challenge Solved

Using foot pedals to dictate modifiers would theoretically allow for continuous capital letters to be entered with ease, simple multi-key shortcuts, and augmented mouse operation. On MacOS, foot pedal modifiers work well with the mouse, but unfortunately hitting a pedal to indicate shift doesn’t affect letters from the keyboard. Plugging in a second USB keyboard for multi-input shifting doesn’t function correctly either, pointing to an OS issue.

The good news is that there is a software solution to get multiple keyboards to play nicely together on MacOS: Karabiner-Elements. According to this post, all that’s required is to use two keypads at once is to install the software (which can do many other interface customizations), though you may need to check Modify events as outlined here. This program worked somewhat on my computer (macOS Monterey 12.3.1), though it seemed to cause a few issues.

A likely reason why Karabiner-Elements wasn’t a great solution for me is that I already use and like a keyboard/mouse modifier called USB Overdrive. As far as I know it doesn’t allow for this kind of global shortcut modification on its own and using both together appears to cause some issues. On a more philosophical level, this is opposed to the goal of the JC Pro Macro 2 being a plug-and-play device, even though extra software isn’t a dealbreaker on its own.

Multi-keyboard input does reportedly work without hassle on Linux and testing a second keyboard with a (dated) Windows 8 notebook’s built-in keyboard seems fine as well. This very limited evidence points to a Mac-specific issue, though my understanding is that this sort of multi-keyboard input did function properly in previous MacOS versions.

The Verdict (So Far):

Caption: Potentially useful interface method, not quite there yet

Image Credit: Jeremy Cook

At the end of the day, I believe that this interface method can work but hasn’t yet become part of my day-to-day computing setup. The reasons include:

  • The (very inexpensive) pedals used here take a decent amount of force to operate. They’re also noisy and seem slower than me typing. Potentially a different pedal style would work better.
  • Karabiner-Elements may be a fine program on its own but, having this along with USB Overdrive running has been a hassle.
  • Two foot pedals takes up GPIO space on my JC Pro Macro 2, and doesn’t allow me to control a small fan with it as I normally do. A first world problem for sure, but one could argue the same thing about the “need” for a foot pedal.
  • The pedals need to be in a consistent position. I haven’t yet worked out a good solution for this.

All that being said, for those with certain disabilities, a foot pedal interface may present a very good interface solution. In that case, you’ll certainly want to pay for a higher quality model. This type of foot pedal could also work in a variety of situations where a very simple hands-free on/off control method is needed.

Future Plans:

Caption: First adapter version. “May” not be the last.

Image Credit: Jeremy Cook

For me, this system would ideally be set up so that one could quickly lift and lower a foot for input, while normally being in a “resting” position. I’ve got a few ideas for how to implement this functionality, and haven’t given up on the project yet, but for now a “traditional” keyboard/trackball/macropad will have to suffice!

My experimentation with these boards did provide much of the basis for both a recent PCB QR code article, and this V-score separation piece. Perhaps there’s no such thing as unsuccessful projects, just learning experiences, and/or those that you’re not quite finished with yet!

Jeremy Cook is a freelance tech journalist and engineering consultant with over 10 years of factory automation experience. An avid maker and experimenter, you can follow him on Twitter, or see his electromechanical exploits on the Jeremy Cook YouTube Channel!

Jeremy Cook is a freelance tech journalist and engineering consultant with over 10 years of factory automation experience. An avid maker and experimenter, you can follow him on Twitter, or see his electromechanical exploits on the Jeremy S. Cook YouTube Channel!

More from Jeremy