Hacker News new | ask | show | jobs
by oliverkofoed 5904 days ago
The author recommends remapping "kj" to ESC.

I've remapped caps lock to ESC, which I think is a far better use of that useless button, and a hack i recommend to everybody i know who uses VIM.

I could never understand that VIM choose to put such an important button so far away from the homerow.

3 comments

Escape used to be located closer, IIRC it was next to 1 (on `) on some older keyboards. (Much like Ctrl used to be where CapsLocks is now.)

Moving it is easy, of course. Also, Ctrl-[ is usually the same key as Escape, and if you have CapsLock remapped to Ctrl, they're practically on the home row. (The article hints at this, but doesn't explicitly note that C-[ is Esc.) You could also remap CapsLock to Esc, of course.

I'm on a danish keyboard; the programmer-handy keys like "[" and "]" have been moved to shortcuts (alt-9 for "]") to make room for the danish letters "æøå", so some of the combo's that are easy to make on english keyboards are next to impossible on mine.

Once in an effort to reach maximum typing efficiency, i attempted a switch to VIM+Dvorak. However, i quickly realized that i would have to use a Danish variant of Dvorak (there is no official standard..) and remap VIM to oblivion, which would make me too much of an oddball masochist.

A bunch of my coworkers are Swedish, and I've had similar issues with the brackets. It's aggravating.

I use the English/American Dvorak, but it takes me a second to switch back to qwerty as necessary. (I'm probably in the rare niche of mixed vi/emacs users, FWIW.) Vi + Dvorak isn't so bad, though I feel like Dvorak is (somehow) more compatible with Emacs.

I have the same problem, although for a different language, and solved it by using a shortcut (alt-ctrl-k) to switch between layouts (en-us,etc). I do it both on KDE and fluxbox, which are fairly easy to configure and the "mental" switch is not problematic.
This is what keeps me off switching to Dvorak: I have all these keyboard shortcuts wired into my muscle memory that I would have to either relearn or remap when switching to Dvorak that it's just too much of a bother...
If you're on OS X you can ease into it by using the 'Dvorak except for shortcuts' keyboard mode.
The happy hacking keyboard has both the esc and ctrl keys in these (proper) positions. Highly recommended for vimming.

http://www.engadget.com/2007/01/26/happy-hacking-keyboard-li...

Yeah, but re-mapping is easy. Personally, I'm fond of the (gasp!) Microsoft 4000 Natural Keyboard, with several remappings.
A-men. Plus, OS X makes swapping caps<->ctrl super easy, so do that on a MS4000 and you're two large steps nearer to healthier longer-lasting wrists.
vi was developed on the ADM-3A terminal, which indeed has the ESC key in the space occupied by ` these days. It also had Control in the proper place, but the arrangements of some of the punctuation keys on the right side of the keyboard always seemed rather hosed to me.
In the same vein it seems totally ridiculous that we use the pinky finger to hit ctrl. Surely there are better ways.
There are. The Kinesis keyboard has four thumb buttons on each side of the keyboard. The biggest, closest one on the left side I map to CONTROL. The other big left thumb button I map to ESCAPE.
You can also look into importing a Japanese keyboard for more thumb options.
Why? Do the Japanese have more thumbs?

Sorry. Had to get it out my system.

I don't get it. . . .

They have two thumbs, but within reach of their thumbs are extra keys. They need these extra keys because there are a lot of characters in their writing. They don't need more thumbs, because they only need to push one of these extra keys at a time.

Do I need more pointer fingers if I need to use one of the Y, H, N, B, T, G, and V keys?

Um, it was a joke...
I remapped my keyboard so I can press CTRL with my thumb (it's where ALT conventionnaly is). No need to use pinkies and alternate between left and right CTRL!
I map right alt to ctrl. This gives you alt with your left thumb and ctrl with your right thumb, which is pretty intuitive once you get used to it.
i map capslock to ctrl using autohotkey
I've remapped caps lock to ESC

I find that Mac keyboards are very difficult to remap. Is there any reason for that? Or maybe there's some utility that handles remapping I just can't find. Buggy as it is, I miss xmodmap.

If you're just remapping modifier keys, the Keyboard prefs pane works well (not sure if it's part of Leopard, though).

If you want to map something to ESC, try PCKeyboardHack: http://pqrs.org/macosx/keyremap4macbook/extra.html

You can remap the modifier keys (Caps Lock, Alt, Cmd) from the preferences pannel, in Keyboard. There's a button at the bottom, called "Modifier Keys..."
This is true but that utility won't let you remap Caps to Esc.
Very good Mac keyboard remapper: http://scripts.sil.org/ukelele