It’s 2025, and you’re still probably pressing modifier keys on your keyboard like a… regular person. But it doesn’t have to be this way! You could use foot pedals instead, as [Jan Herman] demonstrates.
Now, if you’re a diehard embedded engineer, you might be contemplating your favorite USB HID interface chip and how best to whip up a custom PCB for the job. But it doesn’t have to be that complicated! Instead, [Jan] goes for an old school hack—he simply ripped the guts out of an cheap USB keyboard. From there, he wired up a few of the matrix pads to 3.5 mm jack connectors, and put the whole lot in a little metal project box. Then, he hooked up a few foot pedal switches with 3.5 mm plugs to complete the project.
[Jan] has it set up so he can plug foot pedals in to whichever keys he needs at a given moment. For example, he can plug a foot pedal in to act as SPACE, ESC, CTRL, ENTER, SHIFT, ALT, or left or right arrow. It’s a neat way to make the project quickly reconfigurable for different productivity tasks. Plus, you can see what each pedal does at a glance, just based on how it’s plugged in.
It’s not an advanced hack, but it’s a satisfying one. We’ve seen some other great builds in this space before, too. If you’re cooking up your own keyboard productivity hacks, don’t hesitate to let us know!
Ahh good old custom HID devices…
Back in the day I used to play an obscure videogame called “TES 3 : Morrowind”. It had a cool exploit (not really though) where I could level up my character’s “conjuration” skill by summoning a skeleton for a single second and repeating it ad infinitum.
I made a custom HID device which would cast the spell a dozen times, make my character sleep until they were rested, and repeat the process again. It took a single night to level up my character from 20 to 100.
Good times. The things I did in my youth…
Candy Maker, here :D
Obscure videogame? Heh are you sure?
Nice, but I did the same, but by memory manipulation.
Does this work consistently? I thought some modifiers only modify the keycodes of the device they’re attached to.
I tried to do modifiers with a bluetooth foot pedal (page turner) before, but couldn’t make it work for the ones I was interested in.
oh right, ctrl, alt & shift are sent alongside the normal keycodes as “flags”. the HID struct looks like this:
struct {
ctrl: bool
alt: bool
shift: bool
keycodes: byte[8]
}
so yea, these 3 are a no-go
Why go through all that? Get an arduino, plug a foot pedal into it, connect it to the computer by USB and with a very simple program it will do all that. It even come with a case.
Definitely a hack. Well done
Unfortunately, this won’t work for applying actual modifier keys (e.g. shift, control, option, command, etc.) to the keystrokes coming from another keyboard. For that to work, you’d need to do something more custom than this that fuses the two data streams before they reach the host.
This might depend on operating system. I tried it with Linux just now by plugging in two keyboards. Pressing ctrl on one keyboard and V on the second keyboard worked fine, and pasted text. Seems to work for any combination I tried.
Works in Windows, using my laptop’s keyboard and a USB one.
Just to be thorough I also tested with two USB keyboards, and that worked as well.
All I can see there is “soft” “sostenuto” and “sustain”, and thinking of interesting ways text could be modified with those inputs.
forced lower case and added repeat keysssssssssss!
I’ve thought about this for switching workspaces/virt desktops. Alt tab, meet alt toe!
Did this for ATE and programming production equipment where both hands are used for the stuff, and you have to hit and repeatedly, and any other key only when there is a problem.
Used a foot pedal from a dictaphone with 3 switches. Saved a huge amount of production time over 25 years. (and yes it’s still in use – Win98 – the wifi card was removed, and the network connector has a sticker so it can never again be connected to the ‘tubes)
… ENTER and “Y” …
https://www.ilcicali.com/wp-content/images/foot.jpeg
10$ Aliexpress footboard, a Teensy LC, a bit (no pun intended) of code, and you have a programmable footboard that has 3+ that recognizes short, double, medium and long presses.
I have this exact foot pedal but the DIY version is still cool since it’s expandable. The one thing I want to change about the pedals is the physical pedal itself, like reducing the travel.
I do this with the 8bitdo mechanical keyboards it comes with NES style A B control buttons that you can use as foot pedals (or as I did replace them with foot pedals). The keyboard takes 3.5mm jack input for the buttons.
https://precondition.github.io/home-row-mods might be more practical for some but definitely less impressive.
I tried to go the cheap keyboard route a few years back, and found that the interconnect between the controller and the key matrix was covered in the same black stuff you find on contacts for buttons in remotes. I never was able to reliably clean enough off to solder wires onto any of the contacts.
These days if I want a keyboard I’ll use an RP2040 running KMK. If I want a game controller, I’ll use an Arduino Pro Micro running MMJOY. I’ve not yet run into a scenario where I want to emulate the mouse, but I suspect one of them will do it too.
If you want more to step on get a junked organ pedal set. 13, 24, or 32 notes are are at your feet. The 13 being on most spinet organs and a usable size under the desk. Remove either the sharps or white pedals for fewer “notes’. 5 or 8 is about right.
Just don’t ever connect the Boîte Diabolique to your PC… :)
https://youtu.be/mE0takm9TX0
Handy when doing some LISP.