https://hackaday.com/2022/12/16/foot-pedal-ups-vim-productivity-brings-ergonomic-benefits/ Skip to content Logo Hackaday Primary Menu * Home * Blog * Hackaday.io * Tindie * Hackaday Prize * Submit * About * Search for: [ ] [Search] December 18, 2022 Foot Pedal Ups Vim Productivity, Brings Ergonomic Benefits 40 Comments * by: Lewin Day December 16, 2022 * * * * * Title: [Foot Pedal Ups Vim P] Copy Short Link: [https://hackaday.com] Copy [finished-o] Vim is the greatest or the worst text editor of all time, depending on the tribe you're in. Either way, members of both camps can appreciate this build from [Chris Price], which uses a foot pedal to ease operations for the user. The basic concept was to use a pedal to enable switching between normal and insert modes. In Vim's predecessor, vi, switching modes was easy, with the ESC key located neatly by the Q on the keyboard of the ADM-3A terminal. On modern keyboards, though, it's a pain, and so a foot pedal is a desirable solution. In the Vim world, it's referred to as a "Vim clutch." The build used a cheap pedal switch sourced from eBay, into which a Raspberry Pi Pico was installed. The Pico was hooked up to the switch contacts, and programmed to act as a USB HID device. When the pedal is pressed down, the Pico sends an "i" keypress to enter Vim's insert mode. Releasing the pedal has the Pico send a "ESC" keypress to return to normal mode. Those that use Vim on a regular basis would likely appreciate the productivity improvements of such a device. Plus, there's some ergonomic benefits to not having to strain one's hand over to reach the ESC key. Of course, it's an old-school solution, but there's still something so compelling and next-level about having a foot pedal hooked up to one's dev rig. * [share_face] * [share_twit] * [share_in] * [share_mail] Posted in Peripherals HacksTagged foot pedal, pi pico, usb hid, vi, vim Post navigation - Battery Engineering Hack Chat Gets Charged Up A Simple High-Fidelity DIY Mic Pre Amp - 40 thoughts on "Foot Pedal Ups Vim Productivity, Brings Ergonomic Benefits" 1. BsAtHome says: December 16, 2022 at 11:51 am But sometimes you want to 'a'ppend and quite often to 'A'ppend or simply 'c'hange and 'I'nsert. And then to 'o' on the next line. And programming loves ... repeats. You need a foot-key board to cover your tracks. Report comment Reply 1. fiddlingjunky says: December 16, 2022 at 12:31 pm Yeah, this is kinda a bandaid. Holistically, it would probably just be better to treat it as "esc" and use the regular motions to enter insert mode. They're mapped to accessible letter keys for a reason. Report comment Reply 2. MrSVCD says: December 16, 2022 at 12:50 pm I can't remember where but I have seen a four way foot pedal (Down, Up, Left and Right). I think it was part of a DIY accessibility mouse setup. Report comment Reply 1. HaHa says: December 16, 2022 at 4:47 pm The footmouse was forever doomed by it's original name. The rat. I already have unused buttons on the side of my mouse. Thumb is already there. Report comment Reply 1. -jeffB says: December 17, 2022 at 9:28 am I miss my foot pedals. I had a TRS-80 Model I, and added an Omikron Mapper that came bundled with CP/M and WordStar. Difficulty: the Model I keyboard had no Control key -- so the driver mapped up-arrow to Control. THAT, with the high position and high and harsh key action, gave me wrist pain almost instantly. I added a pair of audio jacks wired to the connectors for the up-arrow and Shift keys, and plugged in a pair of cheap foot switches that Radio Shack stocked at the time. Stomp-K-S, baby! One Of These Days I'll dig those pedals out and build a little USB box to use them with my current machines... Report comment Reply 2. Leader Key says: December 18, 2022 at 12:57 am Sooooo basically you are telling the world you are a vim user that uses a mouse.... Tell us more Buddy, The point of Vim is LITERALLY to NOT have to take your hands (or feet) off the keyboard. #YouHadOneJob [?][?] Report comment Reply 3. Ren says: December 16, 2022 at 3:49 pm I have enough unused keyboards around here that I could use one of them, build a barrier over the other keys and put a small extension on the needed key. Report comment Reply 2. Greg A says: December 16, 2022 at 11:55 am yow! i'm a third tribe -- vim is awful, because nvi (roughly, BSD vi) is much better. and this article illustrates an attitude that seems pretty ridiculous to me. but, i mean, use whatever you use, i don't care. there's nothing more personal. but why someone would want to suffer the downsides of vi without any of its upsides is really beyond me. i know people who use vi out of inertia (people who learned vi before non-modal screen editors proliferated), even though they don't take advantage of it the way i do...which makes a lot of sense but the last thing that group would want is to learn a novel input device. i use 'i', 'a', 'I', 'A', 'O', 's', 'c' with about equal frequency, and 'r' and 'S' pretty often too. it's fair to suggest the editor has "two modes" but how you enter the edit mode is of crucial importance. each one of these edit operations can become an atomic interaction, which you can undo/redo with 'u' or '.', or which you can script. i use ':map e .n' for example, and that's only really effective if you're particular about the operation that you're repeating. usually for me it's something like 'c3labc^['. it's enormously powerful, it's basically my first resort on the spectrum of nvi -> sed -> awk -> perl for one-off text processing hacks. the biggest reason i personally prefer nvi over vim is that it has a superior (and apparently unique) meaning for 'u' and '.'. vim has two modes for it (one of which is compatibility with sunos vi), and i don't like either of them and they aren't as powerful. the biggest reason i consider vim bad as more than just a matter of personal taste is that it's O(n^2) in basic operations. consider the case of making a 4MB text file just for test purposes. obviously there are a bunch of tools but nvi is usually the tool already in my hand so i type '1000000ablah^['. less than a second later, i have my file. try it in vim! with a repeat count of 1000, it takes about a second on my PC. with a repeat count of 10000, it takes more than a minute! 1000000 would take days. i assume this is a side effect of how the undo stack is implemented...adding insult to the injury that the undo stack isn't as featureful. i rarely need to repeat an operation more than 1000x but sometimes i do, and i do it without thinking, and nvi never crashes. the arbitrary limitation really bums me out. Report comment Reply 1. Ren says: December 16, 2022 at 3:51 pm You're not a 3rd tribe, you're 6 Standard Deviations from the mean! B^) Report comment Reply 2. HaHa says: December 16, 2022 at 4:49 pm Edlin forever! Report comment Reply 1. Miroslav says: December 16, 2022 at 7:58 pm Ed is the standard text editor. https://www.gnu.org/fun/jokes/ed-msg.en.html Report comment Reply 1. Seppo Yli-Olli says: December 18, 2022 at 8:01 am It's actually funny how ed is in reality requirement for critical parts of GNU/Linux build stack considering how dead the project upstream is. Report comment Reply 3. TG says: December 16, 2022 at 12:04 pm I am confused when I meet somebody who hasn't remapped caps lock. Such a RARELY used key, such good real estate. That key should be way over by sysreq or something. A lot of people put ctrl there, but I think it's better to train oneself to palm-press ctrl Report comment Reply 1. anon says: December 16, 2022 at 12:49 pm I am confused when programmers tell me they use shift (sometimes even alternating it between hands) to type out LONG_CAPS_VARIABLE_NAMES and such. I agree that it's more rarely used but I would feel hopelessly handicapped without it. Maybe I should swap caps and escape at some point, but I fear having to type on other's keyboards... Report comment Reply 1. Raniz says: December 16, 2022 at 12:59 pm This is essentially a non-issue for me. My neflexes associate layout with the keyboard in question so when I type on another keyboard they go back to "default". Temporarily remapping my own keyboard gives me problems though. Report comment Reply 2. TG says: December 16, 2022 at 2:44 pm I say keep it but not in the home row. And yeah when I type on other people's boards I have to shift gears. It gets manageable with a little practice Report comment Reply 3. CityZen says: December 16, 2022 at 4:19 pm Well, Emacs users can always just type the name in lower case, then go back and hit the upper-case word command a few times. Or they can mark the start and do upper-case region at the end. But really, I have no problems holding down shift to type. I find I use my left pinky to hold down shift, and I if I need to type Q/A/Z I use my ring finger. The problem of typing on multiple keyboards is definitely an issue. I really miss CapsLock mapped to Control when using other people's keyboards, but it's not usually a big issue. Report comment Reply 4. moldborb says: December 16, 2022 at 8:38 pm if you're writing in vim anyway, just type the name in lowercase and use vbU - no need for shift or caps lock Report comment Reply 5. Tyrdal says: December 18, 2022 at 3:42 am I Just use gUiW Report comment Reply 2. Greg A says: December 16, 2022 at 7:45 pm i strongly agree but of course to each his own. i use dvorak, and capslock remapped to control. people are saying it's hard to switch keyboards...and that's also of course a really personal problem. me, i don't use other people's keyboards that often, and when i do, it's not for a long time...so it's just not an issue, even if i have to resort to hunt-and-peck for 5 minutes out of a day it's not a big deal. i mean, it's probably already awkward as heck because i'm like reaching across my buddy's body to use his keyboard. the time i run into it is when i'm like installing or booting up single user or whatever...you know, when the computer is broken. and it is a little nuissance, like, i'm fighting with grub for a minute but it's not like i'm typing a novel. and in that minute, i'll accidentally toggle capslock a few times. *shrug* if my job put me on other people's computers or managing fresh installs all the time or something, i would have different habits. honestly, i'd probably do the same thing, but i'd learn to get better at switching. in highschool i could switch dvorakqwerty without much stress, because every day it was qwerty at school. it really is pretty amazing what you can train the reflex part of your mind to, if you're willing to suffer through about a week of keyboard-confusion. Report comment Reply 3. anon says: December 17, 2022 at 6:50 pm Personally, I remapped the sequence "fj" to ESC. There are a minimal number of English words with that sequence, and the keys are right under the each index finger. Report comment Reply 4. Ryan says: December 16, 2022 at 12:05 pm Re-mappings Caps lock to Escape is so much easier! It annoys people that try to use my computer, but it's not as bad as the Dvorak guys... Report comment Reply 5. anon says: December 16, 2022 at 12:52 pm Haha, I was thinking about making exactly that a bit ago. Glad someone else beat me to it :') Although, I would've just kept it to pressing "ESC" instead of also pressing "i" on release. Report comment Reply 1. David says: December 16, 2022 at 1:04 pm https://www.delcomproducts.com/productdetails.asp?PartNumber= 703600 Report comment Reply 6. Timmy says: December 16, 2022 at 2:16 pm Just. Use. Nano. Report comment Reply 7. Perry says: December 16, 2022 at 5:04 pm What's amusing is that Pico is another "simplified" editor for Unix that predates Nano. So this person is using Pico to drive Vim... Report comment Reply 1. Michael Black says: December 16, 2022 at 6:41 pm Pico.came with Pine. When the University of Washington released the software, Pine became Alpine, and Pico became Nano. Functionally the same. When I first installed Linux, I added Joe. Depending on how it's invoked, it takes on other editors like Wordstar. Report comment Reply 1. Greg A says: December 16, 2022 at 7:49 pm yeah! i'm always surprised the war seems to be between vi (which is a weird thing) and emacs (which is fantastically bloated). i sometimes wonder if there aren't people using vi today simply because they don't want to use something as bloated as emacs! seems crazy that people would be forced into something so esoteric just because they don't like bloat. but editors like joe (or pico/nano) exist and are totally a reasonable option...the non-vi world is not simply emacs. i came from VDE.COM on DOS and joe was a natural fit for me. Report comment Reply 1. Foldi-One says: December 17, 2022 at 8:10 am The thing with Vim type stuff is it is more than just a text editior - it has way way more features than something like nano, that if you actually get familiar with using it can greatly increase your productivity. Nothing wrong with nano (etc), for 99% of most peoples text editing jobs it is as good as anything else I expect. But if you do use even a few of the powerful features of Vi enough to get comfortable with them it is hard to go back - just the keeping the hands on the homerow and having the navigation controls and delete whole words imeediately is so handy and quick compared to nano (and the like) when editing those few settings in a config file (until you start to forget how to really use Vi again though lack of use)... Report comment Reply 8. Lee says: December 16, 2022 at 5:25 pm How many tribes are there? I use Pico/Nano, sublime text and emacs. Report comment Reply 1. HaHa says: December 16, 2022 at 5:38 pm Tribes are getting smaller as the churn approaches. Report comment Reply 9. WRSomsky says: December 16, 2022 at 8:08 pm I ran into this issue 30 years ago w/ an IBM AIX (IBM's version of UNIX) computer using a PC keyboard. My solution, which I still use to this day, was to remap the ` key to ESC, Shift+` to `, Backspace to Backspace, and Shift+Backspace to ~, along with CapsLock to Control. Report comment Reply 10. punky says: December 16, 2022 at 9:25 pm Ctl+left bracket = Esc Report comment Reply 11. defdefred says: December 17, 2022 at 1:05 am You can use the arrow keys now in vim... Much less use of esc... Report comment Reply 1. Derrekito says: December 17, 2022 at 11:31 am You can try swapping escape and caps setxkbmap -option caps:swapescape Report comment Reply 12. Doctor Wizard says: December 17, 2022 at 6:42 am I use a 3-pedal foot pedal meant for transcription. You can find them on FleaBay for $20. Stock, it plugs into USB and Windows/ Linux see it as an HID device but I was unable to get Windows/ Linux to translate that into useful keystrokes. So I ripped out the stock controller and replaced it with a clone Arduino Pro Micro AT324U (cheaper and smaller than Pi Pico). Programmed it to send F22, F23, and F24, then use AutoHotKey to map that to keystrokes appropriate to whatever application has focus. For many apps, I use the left pedal for copy, right pedal for paste. Or back and fwd for the browser. Report comment Reply 13. Roberto Maurizzi says: December 17, 2022 at 9:37 pm Tell us the truth... they bought a MacBook with the ESC key on the OLDE bar, right? Also: in many dotfiles I've seen, people remap ESC to insert mode jj, so... Report comment Reply 14. Zerocell says: December 18, 2022 at 3:01 am I think I will just remap my caps lock key to act as escape. Wouldn't that be better? Caps lock key has got to be the least used key that is the closest to the left pinky. Report comment Reply 15. shod says: December 18, 2022 at 4:22 am I once tried a foot pedal (switch) as a computer interface addition, only to find I move my feet too much and don't have it near the pedal when I need it. Unless I sit still in a unnatural manner, which is sort of beating the purpose in my view, and will probably not be healthy either. Multiple extra mouse keys is a better way, unless you need a linear type input like with driving games, but that's another kind of pedal. Or, if you are the type, you can use a voice interface I guess, a single 'toggle' voice command is doable, doesn't need a lot of chatting nor a server in a data-center to achieve. One reply remark to Doctor Wizard: The AT324U has not been cheaper than a pico for quite some time now, the chip shortage apparently means all those clones are not as budget as once. Report comment Reply 16. Clem Ca says: December 18, 2022 at 7:31 am I use a cheap three pedals device daily. Not for vim, though. I use it for left/right/down. Combined with previous \ next on my mouse, I avoid using the scrollwheel and the keyboard and it makes reading a breeze. Had to install the drivers from the wayback machine, though. And that was several years ago. Report comment Reply Leave a Reply Cancel reply Please be kind and respectful to help make the comments section excellent. (Comment Policy) This site uses Akismet to reduce spam. Learn how your comment data is processed. Search Search for: [ ] [Search] Never miss a hack Follow on facebook Follow on twitter Follow on youtube Follow on rss Contact us Subscribe [ ] [ ] [Subscribe] If you missed it * [darkarts-t] This Week In Security: Scamming The FBI, In The Wild, And AI Security 10 Comments * [1024px-Pla] Australia's Soft Plastic Recycling Debacle 68 Comments * [Foul_thumb] The Story Behind The TVGuardian Curse Catcher 21 Comments * [USBC_thumb] All About USB-C: Cable Types 41 Comments * [artemisroc] NASA Aces Artemis I, But The Journey Has Just Begun 51 Comments More from this category Our Columns * [batterycha] Battery Engineering Hack Chat Gets Charged Up 8 Comments * [microphone] Hackaday Podcast 197: Decoding VHS, Engineering The TV Guardian, And Gitting Code Into Your ESP32s No comments * [640x480-vt] Retrotechtacular: A 1960s Look At The 21st Century Home 24 Comments * [Sam_Mulvey] Supercon 2022: Sam Mulvey Shows You How To FM Radio 16 Comments * [18wheels_h] Hyundai To Lead US Market For Hydrogen Fuel Cell Trucks 95 Comments More from this category Search Search for: [ ] [Search] Never miss a hack Follow on facebook Follow on twitter Follow on youtube Follow on rss Contact us Subscribe [ ] [ ] [Subscribe] If you missed it * [darkarts-t] This Week In Security: Scamming The FBI, In The Wild, And AI Security 10 Comments * [1024px-Pla] Australia's Soft Plastic Recycling Debacle 68 Comments * [Foul_thumb] The Story Behind The TVGuardian Curse Catcher 21 Comments * [USBC_thumb] All About USB-C: Cable Types 41 Comments * [artemisroc] NASA Aces Artemis I, But The Journey Has Just Begun 51 Comments More from this category Categories Categories[Select Category ] Our Columns * [batterycha] Battery Engineering Hack Chat Gets Charged Up 8 Comments * [microphone] Hackaday Podcast 197: Decoding VHS, Engineering The TV Guardian, And Gitting Code Into Your ESP32s No comments * [640x480-vt] Retrotechtacular: A 1960s Look At The 21st Century Home 24 Comments * [Sam_Mulvey] Supercon 2022: Sam Mulvey Shows You How To FM Radio 16 Comments * [18wheels_h] Hyundai To Lead US Market For Hydrogen Fuel Cell Trucks 95 Comments More from this category Recent comments * Lee on What's Inside A Super-Cheap Projector? Not A Lot! * alialiali on Medical Ultrasound Scanner Gives Up Its Secrets, Runs DOOM * PreferLinux on A Simple High-Fidelity DIY Mic Pre Amp * Ren on A Transistor? Memory? Wait, It's Both! * Al Williams on A Transistor? Memory? Wait, It's Both! * mac12345 on What Happens When Implants Become Abandonware? * bebop on A Binaural Microphone For The Great Outdoors * TG on What Happens When Implants Become Abandonware? * TG on What Happens When Implants Become Abandonware? * ScubaBearLA on Printed Film Camera Gets 10 Seconds Out Of A 35mm Roll Now on Hackaday.io * Chris Wheeler has updated the log for Electronic work bench. * Ivan Stepaniuk has updated the project titled Full byte power strip. * Jacob Hahn has added a new log for USB 5.25-inch Floppy Disk Drive. * Dominik Meffert has updated details to Hot-Wire Plastic Cutter. * Dominik Meffert has updated the project titled Hot-Wire Plastic Cutter. * Capt. Flatus O'Flaherty has updated the log for Mushroom Growing Control System. * NuclearPhoenix wrote a reply on instructions for All-In-One Gamma-Ray Spectrometer. * deShipu has added Psychic ePaper to CircuitPython. * deShipu has added Braille Featherwing to CircuitPython. * deShipu has added CO2 Cubed! to CircuitPython. Logo * Home * Blog * Hackaday.io * Tindie * Hackaday Prize * Video * Submit A Tip * About * Contact Us Never miss a hack Follow on facebook Follow on twitter Follow on youtube Follow on rss Contact us Subscribe to Newsletter [ ] [ ] [Subscribe] Copyright (c) 2022 | Hackaday, Hack A Day, and the Skull and Wrenches Logo are Trademarks of Hackaday.com | Privacy Policy | Terms of Service Powered by WordPress VIP [impression] [close] By using our website and services, you expressly agree to the placement of our performance, functionality and advertising cookies. Learn more OK