Live data from Hacker News

Vim Foot Pedal

hackaday.com

31–40 of 134 posts

Re: Vim Foot Pedal

#32
post #8

Someone long ago, probably here, suggested binding the sequence 'K-J' to 'ESC'. Now I don't even have to take my fingers off the home row.

If you're going to do this, I recommend mapping both jk and kj, so you can just mash the keys simultaneously.

Re: Vim Foot Pedal

#33

I wrote a post a while ago about getting an inexpensive three-button foot pedal to work under Linux.[1] I have the different buttons mapped to different keys in Xorg (which can then be mapped to any commands in .vimrc), but I'm not sure how to map the keydown and keyup events to different keys so that the "clutch" behavior can be implemented in software only. 1: https://catswhisker.xyz/log/2018/8/27/use_vecinfinity_u…

Until I switched to a kneeling chair I had a 3 button foot pedal under my desk. I programmed it with https://github.com/rgerganov/footswitch and it worked an absolute treat. As an i3 devotee it was even more special.

It didn't support up/down events but that was ok for me.

For me the mapping was: button 1 i3 workspace back_and_forth. button 2 exec a floating urxvt terminal. button 3 i3-lock.

Re: Vim Foot Pedal

#34
Using Emacs on contemporary keyboards causes similar problems because the Ctrl key used to be in a much more convenient location. I have had good experiences switching the left side Alt and Ctrl keys to remedy the problem. But the foot pedal is almost more elegant.

Re: Vim Foot Pedal

#35
Just for a little bit of context lost in the HAD summary, this was not a serious build!

> ... what better way to show my appreciation to an infrequent Vim user, than to add another rarely useful peripheral to their bag!

> ... As much as I built the pedal for a joke, I can’t deny that there is something very satisfying about using it.

Re: Vim Foot Pedal

#36

Map holding caps lock to control and esc on tap, you never use it anyway :)

OS offer emulating Caps Lock by pressing both Shift keys, no? This would be a solution for people who HAVE TO WRITE UPPERCASE A LOT for some reason.

Re: Vim Foot Pedal

#37
post #30
post #25

When reading all these recommendations, I wonder why nobody is using ctrl-c to exit insert mode..?

It behaves differently than Esc.

I am also curious as to how. I have been using CTRL-c for quite some time and even remapped sublime vintage mode to use it on Windows when I am. It using Vim.

Re: Vim Foot Pedal

#38
post #7

Earlier quoted context omitted.

Agreed. Most vim users swap esc with caps lock anyway, making it even easier to reach. I don't think pedals bring any significant ergonomic benefit, but pedal setups look cool nonetheless. Swapping keys isn't interesting and you can't write a blog post about it.

> Most vim users swap esc with caps lock anyway "Some", sure, but "most"? Not so sure about that. Besides, everyone knows what Ctrl is the One True Key™ in place of the Caps Lock and that only degenerate infidels map it to anything else.

That, and "inoremap jk ".

Re: Vim Foot Pedal

#39
post #7

Earlier quoted context omitted.

Agreed. Most vim users swap esc with caps lock anyway, making it even easier to reach. I don't think pedals bring any significant ergonomic benefit, but pedal setups look cool nonetheless. Swapping keys isn't interesting and you can't write a blog post about it.

> Most vim users swap esc with caps lock anyway "Some", sure, but "most"? Not so sure about that. Besides, everyone knows what Ctrl is the One True Key™ in place of the Caps Lock and that only degenerate infidels map it to anything else.

My personal heresy is: ino jj

I like it because my fingers never leave the home row.

Re: Vim Foot Pedal

#40
I actually bought one a while back for the emacs metakeys issue which had 4 buttons (it was originally designed for turning pages on a pad while playing music). It worked pretty well while it lasted, but broke after like a year.

Having a qmk split keyboard (the iris specifically https://keeb.io/collections/iris-split-ergonomic-keyboard) was a more lasting solution that also solved some other ergonomic issues. Now my thumbs do more than just thonk the space bar. Control, shift, space, meta, backspace/delete, enter alt and esc are now done by thumbs instead of pinkies.

Post reply on HN