I've moved to s a standing desk. So now, obviously, I need something useful to do with my feet! It's time for a USB powered set of foot pedals!
They're between £20 - £40 depending on what the algorithm think you'll pay. The USB cable is about 2 metres long - which is just about adequate for me. The switches have little tactile nubs on them and are well sprung. These aren't Cherry MX quality switches - but they feel decent. There's a bit of a clack as they spring back up again.
The OEM is PC Sensor - and they have full details on their website. As a USB device, it is pretty much plug-and-play. By default, the pedals send the letters
c - yup, this thing shows up as a very large keyboard!
But how to configure it to be something useful? A small CD came with the device, with a Windows only program:
For Linux nerds like me, it shows up as:
1a86:e026 QinHeng Electronics
A bit of light searching takes us to the "footswitch" utility. It's pretty easy to install from the command line:
sudo apt-get install libhidapi-dev git clone https://github.com/rgerganov/footswitch.git cd footswitch make sudo make install
sudo footswitch -r and it will show the default configuration:
[switch 1]: a [switch 2]: b [switch 3]: c
Here's how to build a StackOverflow™ Keyboard!
sudo footswitch -1 -m ctrl -k a -2 -m ctrl -k c -3 -m ctrl -k v
That sets the first (left) pedal to modifier ctrl and the key to a. You can program it to via the hex values of a key, or the name of a key. There are more details on the Robotz wiki.
You can also program it to send more complex strings -
sudo footswitch -1 -s "This is a test" - that will send
This is a test every time you stamp on it. You can send up to 38 ASCII characters.
Note: You must program all three keys at the same time. If you leave one blank, it is set to null and won't do anything.
Running the command actually writes the key sequences to the device. So if you unplug it and move it to another machine, it will remember how it has been programmed.
As well as the slightly short cable, there are two other things to be aware of.
Firstly, the unit is fairly light. There are rubbed feet on the bottom, so it shouldn't slip around. It would be nice if it was a bit heftier.
Secondly, because it is a USB HID, it can only send a limited number of commands. So you can send keypresses, and it will even emulate mouse movements, but you can't program macros or get it to send complex Unicode sequences.
This is a handy (footsy?) device. Whether you're sitting or standing, it's always nice to have a bunch of extra keys. And you can pretend that using them counts towards your 10,000 steps per day goal!
Thank you very much to my darling wife for such a thoughtful anniversary present. She knows me so well!