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.
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.
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.
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!
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.
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.
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.
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.
"other experimental variations were later built and tested, including foot-pedal operated, knee-operated, even head-operated ("nose pointing") devices."
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.
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.
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.
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.
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.
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.
226 comments
[ 7.5 ms ] story [ 271 ms ] threadThis can be used to easily control the keyboard: http://www.pjrc.com/teensy/td_keyboard.html
I'm pretty happy by having my caps lock key mapped to escape, though.
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.
This is the latter.
https://www.google.com/search?q=programming+foot+pedal
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.
That said, for me as a pianist the idea of mode pedal looks pretty awesome. It just needs to be developed a bit further.
Doug Engelbart (http://en.wikipedia.org/wiki/Douglas_Engelbart) around 50 years ago:
http://www.dougengelbart.org/history/pix.html
"other experimental variations were later built and tested, including foot-pedal operated, knee-operated, even head-operated ("nose pointing") devices."
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
http://emacswiki.org/emacs/FootSwitches
http://shorttalk-emacs.sourceforge.net/ShortStep/index.html
If pedal-up worked, it would be neat to be inserting only while the pedal is depressed.
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?
A clutch can be used for mod switching; such as running mode, stealth mode or reloading guns.
[^] Nintendo is a holdout here, though the WiiU apparently has the buttons.
I only use i part of the time, however; I, a, A, o, and O are each used substantially.
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.