226 comments

[ 7.5 ms ] story [ 271 ms ] thread
Interesting, but you might get better mileage out of a teensy arduino (http://www.pjrc.com/teensy/) a tin, and some proper foot switches.
My brother made a foot switch using a piece of wood and a sanwa arcade button. I have a couple of teensy boards here, if I get time I may just make one.

This can be used to easily control the keyboard: http://www.pjrc.com/teensy/td_keyboard.html

Haha :D I have actually had the same exact idea. I'm a very keyboard oriented user and I have a wide variety of gaming controllers (including 2 sets of different kinds of pedals for aviation and racing). So I've been thinking about doing a foot operated PC controller, but someone beat me to it.

I'm pretty happy by having my caps lock key mapped to escape, though.

Time to reprogram my Kinesis' footswitch! ... If I can remember how
(comment deleted)
Very nice. But why put something like this on GitHub?!!
If you're a coder you probably already have a GitHub account maybe not a web host.
I myself am thinking of hosting all my school files next semester in Github. Its free, and fast, and, well, Git.
I did this for a while, highly recommended.
git/GitHub are not for code. They are for version control. Most common applications of git are in software (since things like MS Word et al. have their own implementation of revision history within the software package), but it's not limited to such.

Suppose he comes up with a better way to build the device. It would be good practice to have all versions available, something that isn't as easy to do with a website. Additionally, his target audience is people who use vim, which probably has a reasonably large overlap with git/GitHub users.

I hope that it does not become a trend to create repositories for every blog post. Github is not a personal blog, and I don't think it should be used as such.
I hope that it does not become a trend to create repositories for every blog post. Github is not a personal blog, and I don't think it should be used as such.
Another benefit of hosting something like this on GitHub is you get instant scaling in case you hit the front page of HN (or similar sites) and suddenly get thousands more visitors than some blog software can handle.
Some ideas are smart. Others are GENIUS.

This is the latter.

Wow, that's some really badass text editing skills — with a pedal. I imagine one with a piano keyboard with Vim macros attached to each key. That would be dynamic!
(comment deleted)
Reminds me of the shoot/cover pedal on Time Crisis arcade machines.
I don't understand this. I can't see how this is faster than simply hitting `i`.
I dunno, but a foot pedal to hit C-[ would be nice.
Because you don't have to hit escape or jj to exit out. You just let your foot off the pedal. No chance of accidentally being in edit mode or not.
I doubt that foot / finger coordination is good enough to get the timing right without losing some keystrokes.
I mean, initially, sure. But if any of us spent a day with this I doubt it would be anything less than second nature. Brains are incredibly elastic.
Then it is a good way to train your foot / finger coordination.
As a drummer, I'd say you'd be surprised how fast people learn to sync feet with hands. It's really quite easy with a little practice.
You can use Ctrl + [ instead which is easier...
This reminds me of my friend's father who decided to learn programming later in his life and signed up for a class. Incredulously, their language of choice of Perl, and so not two weeks later he comes back from a class and shows a handout that says:

     slkjs/sdfjks/\1jksok/j23kjdj\skjd

   is the same as 

     lkkd\kk////?!@

   except latter is shorter and easier to understand
The note was actually correct and the actual expressions made sense, but to an average person both looked like a line noise. Needless to say it was his last class.
(comment deleted)
We discussed that yesterday at work, but decided that it will be more useful in Emacs than in Vim. :)
How would you use it with Emacs?
This one is not quite useful as it works like on/off trigger, but the one, which can be used as a direct replacement of Ctrl-X or Meta-X will be quite useful. (I am actually Vim user, so I had to ask my Emacs guys on what will be useful with the pedal)
Same, that's why I asked. I know Emacs has various 'modes', like haskell-mode, org-mode, SLIME, etc., but I don't how or if a footpedal would make sense for that. I don't think Emacs users switch between those modes as frequently as Vim users switch between our main modes.
Fucking brilliant! I am going to grab me a broken sewing machine...and vim will never be the same again !
The escape bit would work great, but there are so many other ways to enter insert mode apart from i that I'm not sure how useful it would wind up being.
That's what I was thinking as well. I really don't enter insert mode using i very often at all. Fun project, but I don't think it would actually be productive to use.
> Has anyone thought of this before?

The 1992 paper "The Prevention of Mode Errors Through Sensory Feedback" [1] uses this exact mechanism.

[1] http://research.microsoft.com/en-us/um/people/asellen/public...

I've argued for years that vim is one of the few good examples of modal design since it allows for quick entry of the command grammar without modifiers and the command grammar is an excellent fit for the domain. Whenever I bring this up with an interaction designer, I'm told there is no such thing as a good mode. The citation chain has always wound up at this paper and while I generally agree with the paper's conclusion, I'm frustrated that the editor is used in the most inspid way possible to generate mode errors (at the rate of 3-6 in 10 minutes of editing...). The problem given in the paper is solved by `:%s/\<[A-Z]\+\>\zs/errorerror/g` and I could probably do it a half dozen other ways.

Every time I read the paper I tell myself I should make/acquire a pedal and try it out but I've always been too lazy.

VIM clutch does not seem to prevent mode errors, though. For that pedals need to have feedback. I.e., if one hits 'a' out of habit or accidentally, stepping consequently on the insert pedal would predictably enter 'i' character. That would be avoided if the pedal changed to pressed state depending on mode.

That said, for me as a pianist the idea of mode pedal looks pretty awesome. It just needs to be developed a bit further.

Just need to make sure pedal down is idempotent. Having the pedal send something like Shift+F2 and then `nmap <s-F2> i` `imap <s-F2> <Nop>` takes care of that. Escape is always idempotent so no issues there.
If you are appending to the end of the line <esc>i will move you left one character.
I believe that'd be a non-issue since the "i" is always preceded by an "Esc".
Glad to see other people experimenting with this kind of setup. I've known a few people to use one of these [1] for Emacs (for Ctrl & Meta), and I finally picked one up a while back.

My setup has one pedal bound to Escape for Vim, and the other two switchable using F keys and some xbindkeys magic. By default, they're "switch WM workspace" (sort of like Alt-Tab) and "switch window focus within a workspace" in Awesome WM, but I can change them to e.g. j and k for reading my email, or have them run various scripts, or whatever.

It's a lot of fun to use, but I haven't been on it much lately having switched to a standing desk and I haven't yet figured out a way to make the two play together nicely. And, as always, I've been meaning to throw the scripts & dotfiles on GitHub, but I'm a slacker.

[1] http://www.kinesis-ergo.com/fs-savant-elite.htm

If OP puts it on Kickstarter (no pun intended), I'll be your first pledge. Would really want pedal-up event too and customisable for other apps (ie you can switch the key mapping).

If pedal-up worked, it would be neat to be inserting only while the pedal is depressed.

Congrats. I've been thinking for a while to make a clutch for switching hosts file. (I need to switch from testing to production environments for a while) But your idea is much better.
Another option would be to break apart a wired Rock Band drum kit so it's just the center controller and the drum pad the USB cable comes out of, connect that to a computer and use Joy2Key (or an equivalent) to map the bass pedal to Esc/i. Not nearly as nice, mind you, but if you're sitting on a half-broken kit like I am, it is cheaper.
Pish-posh. What if you wanted to go into insert mode with an 'a' or an 'o' rather than an 'i'? It needs more pedals.
He has plans for this already: https://github.com/alevchuk/vim-clutch#extras
Not enough. "I don't use always use vim, but when I do" I enter insert mode in all kinds of ways that are mostly never just i. Usually c and a movement. I'd rather just have one switch that did esc when I hit it.
There's so many ways to get into insert mode in VIM he's going to need pedals from a church organ to make this work.
I've been planning to stick an MSP430 inside an old guitar pedal unit for window switching duties. The pedal I have has four switches, I was thinking one for the editor, one for the terminal, one for the browser and one perhaps for firebug or something.

However, maybe these car style pedals would be more ergonomically suited than the little metal studs of guitar pedals, which are designed to be aggressively stamped on.

Thoughts?

This is just about the raddest thing I have ever heard.
I think car pedals are overkill, their travel is too long because they're used to input an analogue range and not just an on/off signal.
This is a pretty neat hack! Not sure that my feet could actually respond as quickly and accurately as my fingers but it'd be fun to try
Why isn't there a clutch for computer games (except car driving games)?

A clutch can be used for mod switching; such as running mode, stealth mode or reloading guns.

Turns out if you have a button to do the same thing, once the user enters immersion the actual control becomes less important. Where alternate hardware is useful is for more analog controls that a joystick/mouse can't easily simulate.
Thumbsticks typically[^] have a button in the base, they're often used for this since one doesn't need to move off the stick to use it.

[^] Nintendo is a holdout here, though the WiiU apparently has the buttons.

This is brilliant!

I only use i part of the time, however; I, a, A, o, and O are each used substantially.

Thought this myself... BUT it could work with three pedals (i, a and o) with the shift key. Brilliant idea though, I would pay up to $50 for one of these.
You may also want to "c" into insert mode ("cib", "ct:", etc...). I seldom have a problem with this since I usually don't hang around in insert mode anyway (if I'm using gVim the cursor also lets me know).

The one I do have a massive problem with is capslock. So many times I'll go back to normal mode and there's a few moments of disorientation before I realise all my commands are being capitalised. Ugh.