top | item 6056420

History of Emacs & vi Keys (Keyboard Influence on Keybinding Design) (2010)

48 points| blacktulip | 12 years ago |xahlee.info | reply

45 comments

order
[+] clicks|12 years ago|reply
Interesting that a Xah Lee site has made it to the front page, most of his stuff had been totally banned on HN.

Ah well. The guy may be a strange individual but he's certainly done good in proliferating a ton of helpful documentation literature on *nix stuff.

[+] e40|12 years ago|reply
His rants and trolls on comp.lang.lisp in the heyday of that group were epic... and annoying. He does seem to have matured somewhat.
[+] nikatwork|12 years ago|reply
> Num Lock on the number keypad also is a relic

Using the numeric keypad as directional arrows can be more comfortable when gaming. I personally prefer to use it as arrows when gaming and numbers when working. I would not buy a keyboard lacking a Num Lock key.

[+] beaumartinez|12 years ago|reply
It's especially useful as a left-handed gamer.

Right-handed gamers have the mouse on the right and use WASD for movement—and there's a comfortable distance between the two. Left-handed gamers have the mouse on the left—using WASD feels very cramped.

The benefit of using WASD for movement though is that there are a plethora of keys in its vicinity that can be remapped. With the numpad, not so much.

[+] petepete|12 years ago|reply
My keyboard has no 'lock' keys and I can't say I miss them (I don't recall using any of them intentionally, ever).

I can understand the keypad being more comfortable for certain games, but it's an edge case.

[+] mjn|12 years ago|reply
A lot of older games would map the numbers 2/4/6/8 as aliases for the arrow keys, so it'd work regardless of what position the numlock was in. Seems to have gotten less common.
[+] siddboots|12 years ago|reply
> ... vi's {H J K L} is still pretty good, but better is {I J K L}...

You've got some nerve, guy.

[+] LanceH|12 years ago|reply
Moving off the home keys is nothing short of awful. After 15 years of using vi daily (but not as my primary editor) I still can't switch to it for just this reason.
[+] asdfs|12 years ago|reply
I do wish that it had been 'JKL;' instead of 'HJKL'. Pulling my fingers from their resting position has always bothered me.
[+] lcedp|12 years ago|reply
The ; default binding is very usefull in navigation too.

Anyhow you shouldn't need `h` often.. Using b, F, T, ge, gE, ^, 0 is much faster.

[+] epsylon|12 years ago|reply
I wish it had been ijkl, just like gamers use wasd.
[+] chao-|12 years ago|reply
Using this to bring up something related, which I have always wondered: How do you orient your hands when performing ⌘+Z/X/C when using a Mac keyboard? Which finger presses the ⌘?

Having used Windows as a child and Linux for many years since, I'm sure a large part is "you get used to whatever you use". However, any time I borrow a friend's Apple laptop to demonstrate something, I always waste a few cycles thinking about just how I should really be dealing with the keyboard, and never really settle on an answer.

At its core, I love the idea of the ⌘ key: Something for shortcuts in GUI applications so that Ctrl can remain for sending Unix Signals. But it's position, combined with the lack of discrete Home, End, PgUp, or PgDn, is a majority of what keeps me from buying a Macintosh laptop. Also the whole function key deal. The keyboard is such an important source of my productivity.

[+] zarify|12 years ago|reply
I tend to just thumb it (the left side one, I only tend to use the right one for the command-delete trash shortcut), same as I do with alt- shortcuts on Windows layout keyboards. I find the mental shift from using command on OS X to Ctrl on Windows pretty easy to do, but then I spend a lot of time on both platforms.

One of the things I find quite difficult to mentally adapt to when switching is the behaviour of the Enter key, since in Windows it is open, and in OS X it is rename (which I find much more useful, since you can command-down arrow to open which is used for folder navigation with command-up for opening the parent folder).

There are a bunch of little-advertised command key shortcuts for Home, PgUp, etc too, so you figure out a way to make it work pretty quickly (some work inconsistently though, I tend to mainly use the word/line based stuff rather than page/document). See http://ss64.com/osx/syntax-keyboard.html .

[+] reubenmorais|12 years ago|reply
I, and all OS X users I know, use the thumb to press command. I rarely need to use home/end, since control-A and control-E work in all text fields. PgUp and PgDn are fn+up/fn+down, but I never use those.
[+] npsimons|12 years ago|reply
Thumb, and incidentally, mine is remapped to Alt/Meta for better Emacs support. I'm not a big fan of the Apple key layout either, but the reason I use an Apple keyboard with Emacs in Cygwin is that it just feels right. Maybe it's because I've been using laptops for such a long time, but something about the pitch and the tactile feedback just seems to hit a sweet spot. Plus, I guess compared with the other HP, Dell and Logitech crap we have around the lab, it's probably the best option (at least for me).
[+] zeckalpha|12 years ago|reply
On the Mac, the Ctrl key can be used for Home and End using the Emacs/bash keys (Ctrl-A, Ctrl-E).

I'm also a thumber.

[+] parbo|12 years ago|reply
You can make it so that F-keys are F-keys by default, and the other actions require Fn. It's in the settings.
[+] zarify|12 years ago|reply
Huh. Odd that he reckons IJKL would be better for vim keys considering you'd have to use the same finger for up and down, while using HJKL you can use different fingers for up and down as well as left and right.
[+] xahlee|12 years ago|reply
here's what i think. in both ijkl and hjkl, you have one finger doing 2 keys. In vi, it's pointing finger doing hj, moving side ways. In ijkl, it's middle finger doing up down. So i think ijkl is slightly better. I remember seeing similar analysis on coleman forum.
[+] chao-|12 years ago|reply
Yeah, he doesn't really present any logic for that, either. As if he's starting from the discrete arrow keys and making an assumption that this is an optimal placement. I remember struggling with up/down on arrow keys as a child, thinking it should be more like a cross, with a space between down and up, or with the left/right keys centered on the gap between up and down.

Edit: Echoing asdfs's comment elsewhere in the thread, I think that jkl; would be an alternative with actual, arguable benefits.

[+] GeneralMayhem|12 years ago|reply
Put your ring finger in the gap between your I and K keys. To press one or the other, you don't have to relocate it, you just roll it in one direction or the other. It's similar to the technique of hitting any of the XABY buttons on an Xbox controller with the side of your right thumb while keeping the end of your thumb on the analog stick.

And in any case, when was the last time you moved up and down at the same time?

[+] johnchristopher|12 years ago|reply
If you touch-type you use the same finger for j and h.
[+] johnchristopher|12 years ago|reply
That vi keyboard is bleeding minimalism in constrast to the lisp keyboard.
[+] penguindev|12 years ago|reply
Yep, and notice where the ctrl is. I just mapped my caps lock to control a few days ago (mac os makes it super easy to do this), and I love it. I should have done it friggin ages ago.

I also started using the leader key (\) in vim, another thing long overdue. That's in an easy location on that old keyboard too.

[+] Zakharov|12 years ago|reply
What annoys me is keyboards that don't have a pause music button, but have a pause button that does precisely nothing.