tags:

views:

2126

answers:

23

I just started using GNU Emacs as my text editor and I am concerned about getting afflicted with "Emacs Pinky" by having to constantly press the control key with my pinky finger as is required when using Emacs. How can I avoid potentially getting this type of repetitive strain injury?

+24  A: 

Making caps lock another control key is a good place to start. Invest in an ergonomic keyboard. Some emacs users even go as far as to get foot pedal things for control and meta...

Alasdair
Autohotkey is probably the best tool for keyboard remapping. You could map CapsLock to Control really easily and make it like that just for Emacs if you so chose. You can also make Shift+CapsLock work as CapsLock. http://www.autohotkey.com/
Dave Webb
That's so excessive.
Joe Philllips
I thought the foot pedals were so they could add more modifier keys.
intuited
Haha! Foot pedal? Got to get one of those :)
armandino
+4  A: 

The Microsoft Natural Keyboard has been very, very good for me. I use emacs for everything 10+ hrs a day with no problems.

Ben Collins
For most common keystrokes, I swapped M and C. E.g., M-n is now 'down-line'. My thumb lies right over M on the MSNK and it works wonderfully.
Paul Nathan
+2  A: 

I have a MS natural keyboard as well and it's awesome. I've managed to train myself to use the side of my left hand (below the pinky) to hit the Ctrl key.

Graeme Perrow
+6  A: 

Remap Left-Ctrl and Caps-Lock so they are where they should be:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,3a,00,1d,00,1d,00,3a,00,00,00,00,00  

Eric Z Beard
Also, the Ctrl2Cap utility from Microsoft works well. (http://technet.microsoft.com/en-us/sysinternals/bb897578.aspx)
James Sulak
If you're on a unix system, xmodmap can be used to swap keys. The latest version of Mac OSX gives you a dialog to make this swap.
Bryan Oakley
+3  A: 

Per @Alasdair, remap Ctrl to "Caps Locks" or elsewhere: instructions for various platforms.

P.S. I'm a bit surprised this can't be done via an elisp function.

Chris Conway
You can on the self hosting emacs kernel. :-P
Ukko
+1  A: 

One of the first things I do on a new machine is remap Caps Lock to a new Control.

Google around, there are plenty of .reg files available that will do this painlessly for you on Windows.

gerikson
+1  A: 

I started using the side\palm of my hands to hit the control key instead of my pinky fingers. My understanding is that on more ergonomic keyboards the control key button is bigger which makes it easier to perform that motion.

Ray Vega
+5  A: 

Get a foot pedal! (I have a kinesis.) After you do, unmap control and capslock so you force yourself to use your feet.

(FYI, remapping capslock will help, but after enough emacsing in one day, will not be a total solution.)

+1  A: 

I can use the Control key in either the west or south-west positions without any trouble. Many Emacsers swear that the control key belongs in the west position and the west position only, and that anything else will ruin your pinky. The only thing we know for sure causes RSI from typing is too much typing. Try type-break-mode and see if a few regular breaks help.

jfm3
+1  A: 

Buy a Happy Hacking Keyboard which has Ctrl in The Right Place (Caps Lock is moved elsewhere). It has excellent response and is configurable via DIP switches for maximum integration on Mac, Windows, and Linux (for example, you can switch what is Alt and what is the Windows key right from the keyboard, no software required).

It also has a very small footprint, if that suits your fancy.

Denis Bueno
+3  A: 

My advice would be to try using your thumbs to press modifier keys (control, alt) when they are within a reach. On keyboards which have shorter space-bar it is possible to press Alt (Meta) even without bending your thumb inwards. You can remap e.g. right Alt to Control and this way be able to conveniently access both Control and Alt. This is also possible on MS Natural Keyboards.

boskom
+1  A: 

Consider a Kinesis Contoured keyboard. It took me about a month to get up to speed with mine and I now consider it to be the ideal Emacs keyboard, even without the foot-pedal.

No joke. I ordered my first one with a food-pedal, but found I wasn't actually capable of coordinating the timing of my feet and my hands sufficiently to make much use of it for modifier keys. For a while I used it to toggle the integrated number pad, but I gave that up when I realized I wasn't using it because the number row on the Kinesis is so easy to reach.

bendin
+7  A: 

For the love of God - use another text editor! If it's something that requires a foot pedal to work with it normally, then... well... frankly, I'm speechless. There is a multitude of powerful contemporary text editors out there that don't require you to memorize volumes of arcane keystrokes or buy fancy hardware.

You know, I can understand and accept a lot of things, but a foot pedal for a simple text editor is really where I draw the line.

Vilx-
That's hilarious! I used emacs years ago and I understand what people like about it, but your answer does make it look pretty silly.
John D. Cook
the memorizing 'volumes' of 'arcane' keystrokes, though, is really subjective. To become equally proficient in any other editor you'd have to memorize scores of commands anyway.
Adriano Varoli Piazza
Might be. I have honestly no experience with Emacs at all, so I can't say how it compares to other editors. I know that it is scriptable to the extreme, so it is one of the most powerful editors by definition, however, if we compare just the out-of-the box features, the story might be different. Also - Emacs is way older than Windows, and uses many idioms that Windows users are unfamiliar with. Therefore I speculate that for Windows users Emacs might actually NOT be the most productive environment without a steep learning curve.
Vilx-
+1, redundant answer - use vi
elcuco
Actually I find emacs to be much faster than so-called "more modern" tools, specifically because everything is accessible from the control and alt keys. There's no requirement to move one's hands from the keyboard to the mouse to click here and there. And another thing - Why is a foot pedal any more ridiculous than a hand pedal? The first cars used only hand controls, for steering, accelerating, slowing, and shifting. Designers moved to foot pedals because it worked better - one didn't need to move one's hands from the wheel to do some operations.
Cheeso
Don't take it so personally! The answer was only half-serious! :) Yes, I completely understand that Emacs can be far more powerful than other editors, and a foot pedal can even more add to productivity. No doubt about it. But the point is - this day and age there are already some standard ways how things are done, and most people are used to them. Cars have standard controls too. I've no doubt that they could be more efficient, but the car would then be unusable for most population and considered a "freak". Like Emacs.
Vilx-
On the subject of learning curves: http://blogs.msdn.com/b/steverowe/archive/2004/11/17/code-editor-learning-curves.aspx
Xiong Chiamiov
@Xiong - yes, it's a classic. :)
Vilx-
+1 For making me laugh...
Adam Driscoll
+1  A: 

One more approach: if you want to avoid getting "emacs pinky" simply do not use pinky to press control key.

If it is necessary remap keys on your keyboard to go in the following order:

[Ctrl][Alt][ Space ][Alt][Ctrl]

On any standard keyboard (which symmetrically positions modifier keys, e.g. any MS keyboard) now you can press Ctrl key with ring finger and Alt key with middle finger on both hands. These fingers are much stronger than pinky and can endure frequent use.

Great tool for easily remapping keyboard keys on windows is AutoHotKey

On Ubuntu I managed to do it using: Keyboard Preferences / Layouts/ Other options

boskom
+1  A: 

Put the modifiers where they were meant to be: on either side of the space-bar, where they can be pressed by the thumb (or other digit of your choice) on the opposite hand from the digit pressing the modified letter (so that C-g is right-thumb on Ctrl and left index on 'g', and C-k is left-thumb on Ctrl and right middle on 'k'). You will note that the correct sequence, from inside out, is Ctrl Meta Super Hyper.

How you do this depends on your OS and your keyboard. For Windows, you might like to start here. In Mac OS X you can look in System Preferences > Keyboard & Mouse > Modifier Keys. For Linux, there are a thousand xmodmap and XKB tutorials.

Funny, my laptop has the ctrl key just about in the same spot (relative to the Z). The other modifiers go in towards the space bar, which is sized so as to leave room for convenient access to other functionality.
intuited
+1  A: 

One solution not yet mentioned here is to use both hands for key combinations.

For example, suppose you want to press <CTRL-K>. On QWERTY-keyboards, <K> is on the right, so press <CTRL> with your left hand and <K> with your right hand. Once you get used to the system, it works fine.

mzuther
You're still pressing ctrl with your pinky, neh?
Xiong Chiamiov
You're right. But by using both hands, you're avoiding repetitive strain injury, and that's what the question is about. At least, that's what I THINK the question is about. :)
mzuther
+2  A: 

Try viper-mode, which is a vi emulator in emacs. As someone who has switched back and forth between vi/emacs/vim several times in the last 25 years, I'm now finally trying viper-mode in emacs, and I like it. I find the vi commands to be more comfortable, but I can still keep the advanced features of emacs that I like.

Greg Graham
+2  A: 

I use emacs and bash all day every day, and I have capslock as an extra left-control key, like VT100 intended. Nobody's mentioned the best way to do that on X11, yet. (actually, this is specific to the X.org/xfree86 X server, which everything uses these days):

setxkbmap -option ctrl:nocaps

 Or edit your xorg.conf to have
Section "InputDevice"
        Identifier  "Generic Keyboard"
        Driver      "kbd"
        Option      "XkbRules" "xorg"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "us"
        Option      "XkbOptions" "ctrl:nocaps"
        Option      "Autorepeat" "200 40"
EndSection

(The XkbOptions and Autorepeat are what I added to the pre-generated one. Then X will start with the right key mapping every time, and you don't have to find where to put setxkbmap to have it executed every time you log in and start your window manager.)

Although gnome does have a keyboard manager thing, as boskom mentioned.

FYI, emacs was originally written for MIT lisp machines with "space cadet" keyboards. X11 has super, hyper, alt and meta modifier keys. Sometimes the "windows keys" on PC keyboards are mapped to Super. They're handy to bind to window-manager stuff (e.g. switch virtual desktops) because almost no apps normally use them.

Peter Cordes
+1  A: 

alt text

@ Xiong Chiamiov

Mike Howard
A link to the comic's page would probably be nice.
Xiong Chiamiov
+3  A: 

I have always been curious about why such a large community of programmers, writers, geeks, etc. haven't yet found super simple and effective solution to this problem. Simply: 1) take a small piece of paper, make paper ball of it; 2) use scotch to stick it on to your left ctrl key (temporarily removing it from the place); 3) when writing, use side of your left palm to press that key - now this key is higher than others and you can do it easily. That way you don't need to buy uber ergo-keyboards, or remap ctrl key to capslock (which you eventually will push with your pinky anyway)...

So much discussions about such a small problem.

pauls
+1  A: 

I totally agree with the remap caps-lock solution, that helps quite a bit. To go even further, I tried and liked the Ergoemacs keybindings. The project is being actively developed, and supported quite well. I personally don't use it because it's not integrated with Mac OS X (some EMACS Keys are integrated in Cocoa), though it seems someone has posted an inputrc file with Ergoemacs keybindings. Another trick I've been playing with is enabling StickyKeys. It's supported on many platforms and alleviates some of the problems specific to chording (as opposed to just overuse): it is apparently recommended on the emacswiki: http://www.emacswiki.org/emacs/StickyModifiers

Chow
+1  A: 

to Chow,

yesterday i found a solution that we can have system wide ErgoEmacs keybinding on the mac.

The trick is to use mac os x's keybinding system so that you have system wide ErgoEmacs keybinding with the Control key. Then, in OS preference, swap the Control and Cmd key.

So that, you get ErgoEmacs keybinding system wide with the modifier beside the space bar. The draw back is of course that normal mac Cmd+key is now at the corner of keyboard. So, it's a trade off, about whether you use most apps for text editing, or the app's shortcuts.

might give it a shot here: http://code.google.com/p/ergoemacs/wiki/ErgoEmacs_keys_system_wide

also, few years back i tried the mac's os wide custome keybinding, some cocoa apps still doesn't support it. See bottom here

How To Create Keybinding In Mac OS X

but perhaps things are better now.

Xah Lee
A: 

Since this thread is still kinda going, I'll add my two cents:

With or without emacs, the ctrl key is useful for tons of stuff on linux or windows: copy, cut, paste, find, close, quit... I use this stuff constantly. So as others have suggested, I want that near the spacebar so I can use my thumb. And that's how it is by default on a mac, where all that stuff uses the cmd key:

[ctrl] [alt] [cmd] [spacebar]

So, I use a mac keyboard on my linux box, and set up the cmd key as a second ctrl key (In Ubuntu Lucid: Keyboard Prefs > Layouts > Options > Alt/Win Key Behavior > Control is mapped to Win keys (and the usual Ctrl keys))

[ctrl] [alt] [ctrl] [spacebar]

Other benefits: * When I need to use a mac sometimes, cut/paste/etc are all in the same place I'm used to. * ctrl+tab (with the real ctrl key) still moves through tabs for browsers and other apps, on both platforms.

The drawback to this plan is that the alt key has moved to the left, so the alt+tab command (which I use for window switching) no longer matches the mac equivalent cmd+tab. But I can still hit it with my thumb, and it's still, to me, a far lesser evil than destroying my pinky. Yeah, I know I could just make ctrl+tab the window switcher, but then the real ctrl key doesn't work for tab switching. Besides, with apps moving into the browser, the window/tab navigational strategies are gonna be in flux for a while -- but the basics like cut/paste aren't going anywhere, so I want them locked down. Under my thumb.

(Of course, if you wanted to use emacs on a mac, I guess you'd be back at square one...)

rob