reddit / emacs

Any experience with FOOT PEDALS?

_ianna · 2022-11-03 20:34
Hi! I am thinking about making a set of foot pedals for Emacs. I've looked into it before and I know different people used them differently but the impression I got was that your feet are too slow and too desynced from your hands to make it worthwhile (at least without significant practice). My motivation stems from my left hand getting pretty overloaded, making some sequences of C and M impractical. For example, I struggle with using binds like C-c <any key> because I tend to hold down the control while I press the next letter, so I get C-c C-<that key>. So my idea would be to have pedals for priming the next keystroke to have a C or an M. So I can press the Cpedal, then hit c <any key> and get C-c key. The pedal would then need to be released in order to register another C. There would be one pedal for C and one for M. The idea is I can push the pedal which I can do pretty precisely I imagine and then release it a little later than I would need to if I was using a keyboard. The idea is to use it for prefixes or commands that lead to typing. Example Uses: * I use M-r for isearch, C-r for reverse isearch, and C-M-r for avy. In my mind I would be able to stomp on one (or both for avy) foot pedals and then just hit r to start. I can then hold down the pedals for as long as I want while I complete my search and they won't do anything. * M-x would just become Mpedal -> x. Whenever I hit M-x normally I sorta shift my hand which means I have to shift back into typing position. Ideally I would just hold pedal and hit x to start typing. * Registers would be Cpedal x r * C-u would be Cpedal u * Giving numbers as universal input would be Mpedal <numbers> command which seems easier to me and would allow me to add it to my workflow more than I do now (I really hate moving my hand down for M and then up for numbers) * I would NOT want to use it for stuff like C-fbnp, M-w C-y, C-x C-c, or stuff where I'm primarily "hitting hotkeys" rather than "typing text" Basically the main advantage is I could hold the pedal through the command but only have it apply for the first key, which is hopefully means I'll be able to sync it with my hands. I know about god mode and similar but I don't like them, at least on only keyboard -- though maybe my pedal could just end up being a "activate god mode" pedal lol I was wondering if anybody had any experience with foot pedals and how useful (or useless) they were in your workflow. Have you ever used footpedals? If so, what did you use them for in Emacs? Did you have any use for them outside of Emacs? Were they comfortable? Anything helps!
CannibalismIsNatural · 2022-11-03 20:47
I'd love to see it in action. Maybe get a shifting knob for switching modes as well.
uita23 · 2022-11-03 20:50
Using a racing sim rig for Emacs input would be pretty baller.
bkdunbar · 2022-11-03 21:09
You don’t have to make them: USB foot pedals are a thing and you can program them for modifiers. I couldn’t really use one myself: my dog likes to nap under my desk and I’d have to shove her out of the way.
anaumann · 2022-11-03 21:19
>I couldn’t really use one myself: my dog likes to nap under my desk and I’d have to shove her out of the way. Or live with the consequences.. "Dammit, every time I try to type 'exclusively', my emacs terminates! Ah, it's just the dog on the ctrl pedal again..." :D
globalcandyamnesia · 2022-11-03 21:24
Why sim it? Use a real car as input. Bind the window wipers to C-x 1. I'm not sure what the horn does, maybe ESC-ESC-ESC.
FluidDr1nker · 2022-11-03 22:11
Why not an ergonomic keyboard with thumb clusters or using evil?
thetemp_ · 2022-11-03 22:31
> So I can press the Cpedal, then hit c <any key> and get C-c key. The pedal would then need to be released in order to register another C. This sounds similar to a "Vim clutch". The idea with that is you use a modal editing system (vim, evil-mode, meow, xah-fly-keys, whatever). You stay in "normal" mode most of the time, but you hold down the pedal to insert text. Basically, when you press down on the pedal, it issues an "i" (or whatever key puts you in insert mode). When you release it, it issues an "ESC" (or whatever puts you back into "normal" mode. I like this idea, because I find that the full press and release of a pedal for editing is too slow and inefficient. You can do it in software though and order a USB pedal online. They go for $20-30 last time I checked.
cazzipropri · 2022-11-03 22:48
No. Just... Just... No.
big_lentil · 2022-11-03 22:51
Because feet
_ianna · 2022-11-03 22:59
Well cuz my feet are just there ya know, I feel like maybe they could be used for extra outputs
7890yuiop · 2022-11-03 23:24
> So I can press the Cpedal, then hit c <any key> and get C-c key. I use and recommend sticky modifier keys, for similar effect. I suggest looking into that as well.
jakorjon · 2022-11-04 00:51
I use a USB foot pedal as a "Push to Talk" key in Discord. I wouldn't recommend it for emacs, but they are not that expensive (and do come in handy for other uses). If you try it, you should find a way to make it so the foot pedal does not move and your foot has a fixed position. Mine slides around all over the place, but again..for "push to talk" that is fine. In other words, a touch typist can type quickly because the keyboard is fixed and fingers sit on the home row. If you can't create the equivalent for the pedal, your foot lag will drive you crazy.
digicrat · 2022-11-04 01:33
I used to have a colleague that used pedals with Emacs to great effect. For myself, I bought a cheap USB foot pedal a few years ago (check amazon) when my wrist was strained for usage with Emacs. I configured one to work as a Ctrl key, and considered adding a second for Alt/Meta. It definitely works and comes in handy to reduce repetitive-stress strains, though it does take some time to get used to it. Once my wrist healed though, it didn't take long before I stopped using the pedals. If I was always sitting at my desk and using the pedals then maybe I would've stuck with it -- it's hard to develop new habits when you can't use it consistently.
zixx999 · 2022-11-04 01:41
Fun unrelated fact: mice used to be a lever controlled with your knee
gammarray · 2022-11-04 01:56
I built myself an “Emacs clutch” for toggling modalka-mode a couple weeks ago. It’s taking some getting used to, but I like it alright. I also configured mine to toggle mute in video calls, which has been nice. Happy to share specifics about my setup if you’re interested.
bagtowneast · 2022-11-04 01:57
>ESC-ESC-ESC Found the vimmer ;)
richardblack3 · 2022-11-04 01:58
I once wanted a kenesis only for the foot pedals for ergonomic emacs use ... old me would have never dreamed I'd end up with 48 keys on a Planck running QMK. ... I code exclusively usining EMACS (clojure dev), and QMK powered boards all but eliminate the need for crazy emacs chording. QMK (and others) eliminate relying on ur OS for custom key bindings. I posted a while back bout my QMK config. Honestly 48 keys are too many keys for me. Give it a shot. I'd be happy to help
[deleted] · 2022-11-04 02:01
[deleted]
richardblack3 · 2022-11-04 02:01
Also, holding a pedal translates into enabling another layer in QMK world. ... But QMK enables one to tapdance in addition to a hold. (Btw "holding" is basically a "tapdance" with one held stroke)
the_ocean · 2022-11-04 02:09
Or both - the Kinesis advantage is designed for a (proprietary) foot switch.
KingEllis · 2022-11-04 02:11
I would suggest spending a day or two practicing earnest touch typing. Meaning, use the Control and Meta/Alt on the left side when modifying a key on the right half, and vice-versa. As an exercise, practice moving down a few lines (C-n a few times), then jump to the end of the line (C-e). For added complexity, get good with the C-u modifier (i.e. C-u 4 C-n C-e to move down 4 lines and jump to the end).
arthurno1 · 2022-11-04 02:41
> I am thinking about making a set of foot pedals for Emacs Can't you just get [Bluetooth piano pedals](https://www.pageflip.com/collections/pageflip/products/firefly) or [some other page turner](https://www.soundbrenner.com/blog/top-5-best-bluetooth-page-turners-for-musicians/) I don't know for sure how they work, but it shouldn't be overly difficult to get them to work with Emacs. > But the impression I got was that your feet are too slow and too desynced from your hands to [Yuja disagrees with you :-)](https://youtu.be/ZZyokBXgEJY)
bugamn · 2022-11-04 03:17
As funny as that idea is, I think the most serious concern would be the dog putting a paw or the tail under one of the pedals
bugamn · 2022-11-04 03:18
I tried pedals in the past, but I ended up not sticking with them and now I use a keyboard with thumb clusters. Learning to use the pedals was way more effort and harder to stick with
phalp · 2022-11-04 03:55
Are you sure about that?
phalp · 2022-11-04 03:59
Forget foot pedals, knee levers are where it's at. More convenient because you don't have to hover your foot in the ready position. I rigged one up for a while until I switched desks.
LukeShu · 2022-11-04 05:31
I used to use a foot pedal, and wrote about it in a previous thread: https://reddit.com/r/emacs/comments/7remed/has_anybody_used_foot_pedals/ I stopped using it when I got a Keyboardio Model 01 keyboard, which has the modifiers on a thumb cluster. Your idea of how it would be used lines up pretty well with how I used it: > I found that my brain didn't want to treat the pedals like it did keys--it wanted to treat them modally. I wasn't *pressing control*, I was *entering control-mode*. I wasn't *pressing shift*, I was *entering caps-mode*. Which works out, because it isn't the quick keystrokes that cause the most strain, it's holding the modifier with one finger while the rest of the hand moves around. I wouldn't use the footpedal Control for the usual quick C-f/b/n/p, but it's great for holding Control as you C-s through a document.
khamuili · 2022-11-04 07:17
steering wheel to replace h and l
doomvox · 2022-11-04 07:25
I highly recommend Kinesis keyboards for emacs abusers-- they move the heavy keys under your thumbs, and get you away from the weird pinky stretches most keyboards subject you to when you want to use control or alt. I briefly tried to use a foot pedal attachment for a Kinesis keyboard, and found it was very slow (as you mention), but much worse it would get kicked around into different places, making it hard to find when you need it; and further I found that I don't maintain a fixed sitting posture throughout the day, and if I slid down a little I'd have to move the pedal to another position. Those problems could probably be solved or at least ameliorated, but for me it wasn't at all worth it.
centzon400 · 2022-11-04 07:27
Those without QMK boards might be interested in [KMonad](https://github.com/kmonad/kmonad), to "customize and extend the functionalities of almost any keyboard. " (I'd be sort of lost without it now. "Silly" little modifications like tap left shift for an opening paren, Space+HJKL for navigation, tap CapsLock for ESC/hold for CTRL, F12 to switch to Colemak...)
doomvox · 2022-11-04 07:31
The knee pointer mounted under the desk was one of the alternative technologies that Englebart's team experimented with, before going with their idea for the Mouse. That's what the OP is thinking of. Interestingly, the NLS system didn't just use a mouse, they had a second one-handed "chording" keyboard on the left, with five keys that you press in combination to type with. It wasn't just a point-and-click system, it was a "point-with-a-two-letter-code" system.
anaumann · 2022-11-04 10:02
That wouldn't be nice, that's right.. But the only pedals for that purpose that I've seen(and that are not like car pedals for simulations) are pretty much closed up: [https://www.elgato.com/en/stream-deck-pedal](https://www.elgato.com/en/stream-deck-pedal)
_ianna · 2022-11-04 11:17
I'll need to read a manual before I can drive a manual lol
_ianna · 2022-11-04 11:21
The idea I had in my head is that I would get some of those super comfy slippers and put a little depressable upside down pedal on the bottom. I'd just press the front of the slippers down to actuate the pedal. That way I have a physical cue that I've entered "foot-pedal-mode" which would also allow me to move them around. EMACS - Exclusive Manipulation (via) Arms Causes Slowdowns
_ianna · 2022-11-04 11:38
I must admit I am not a "normal" typer I guess... I only use the left modifiers and hit both left control, left super, and left meta with my thumb! I also use capslock as control in addition to the normal left control so if a keybind calls for C-M I am mostly ok. Come to think of it I only use my right index finger and thumb for the right side of the keyboard. Regardless, I've tried to get better and I'm too wedded to my ways to do it. Clearly learning to use my feet will be easier than learning to use the other 3/5 of my right hand :P
_ianna · 2022-11-04 11:41
Honestly having a pedal would probably make me more open to use more modal binds, I didn't think of this but I asked my vi friends if they thought this could be useful and they liked it.
_ianna · 2022-11-04 11:49
I'm familiar with QMK. I've similarly downsized my keyboards, [but landed on a different endgame](https://www.reddit.com/r/MechanicalKeyboards/comments/nai23q/space_invader_switches_in_a_modern_65_layout/) I have a keyboard that I wrote the firmware for so I could use it as a controller for my Nintendo, so I don't use it right now, but I wasn't particularly fond of most of QMK's extra features besides just normal layers.
[deleted] · 2022-11-04 12:48
[deleted]
thetemp_ · 2022-11-04 13:29
If you Google for "vim clutch", you'll find many examples. A lot of people have made them using programmable microcontrollers and spare parts, but that's really not necessary unless you want to do it for the sake of doing it. I made one using a pedal that I bought from [famously large US-based online retail outlet]. The pedal is essentially a programmable keyboard that only sends one key. But I don't even bother with programming it directly anymore, because it's easier to just use [Kmonad](https://github.com/kmonad/kmonad). Even though the pedal itself only sends one key, you can use Kmonad's `tap-macro-release` to send one or more keys on the press and another key on the release.
sebhoagie · 2022-11-04 15:06
I used to do that but had to get better at modifiers and using both hands after experiencing some wrist pain. Everyone's experience is different, but if I could go back and teach myself to type properly at an earlier age to avoid the problem entirely, I would. Best I can do is warn others :)
sebhoagie · 2022-11-04 15:10
I got *a lot* of mileage out of making Control behave as Esc on tap. Made the C-M-{key} commands a lot easier to type. I also have a split keyboard so one half of the spacebar is Control, and the other is space when tapped/control when held. Guess the next step to this setup would be a keyboard with proper thumb clusters >\_>
bugamn · 2022-11-04 15:17
The one I had was more similar to this one: [amazon.com/iKKEGOL-Control-Action-Switch-Keyboard/dp/B00CK1BKZQ](https://amazon.com/iKKEGOL-Control-Action-Switch-Keyboard/dp/B00CK1BKZQ) Although closed, it can still pinch anything that is too close to it.
anaumann · 2022-11-04 15:27
Yes, I can see that.. it looks a lot like the "gas pedal" on a sewing machine :)
arensb · 2022-11-04 17:18
I was thinking rather of hooking up a piano pedal, and getting Emacs to accept MIDI input.
arensb · 2022-11-04 17:20
If someone built a car on the same principles as Emacs, there'd be at least six steering wheels strewn around the cockpit, but you could also steer using the radio knobs, if you so chose.
Weekly_Bathroom_101 · 2022-11-04 18:20
I had a lot of success taping erasers to C and M (one on each side) and using my palm to activate them. Also very happy with my gergoplex ortho 40% with thumb clusters.
phalp · 2022-11-05 00:25
Interesting, I wasn't aware of the knee pointer experiment. EDIT: One can learn more about it at https://dougengelbart.org/content/view/145/
d0dgy-b0b · 2022-11-05 12:17
My issue with foot pedals is that they're all mostly fairly poor quality. If someone was to produce a decent one then I'd be interested. If you can find some decent hardware, then yeah I'd go for it.