What is the best way to avoid getting "Emacs Pinky"?

Viewed 32028

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?

33 Answers

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...

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.)

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.

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

 

First I'd like to point out that suggesting not to use Emacs because the default keybindings may not be for everyone doesn't make any sense. Emacs is the most configurable "text editor" ever made and so, of course, trivial things like keymappings are fully configurable.

Regarding the "Emacs pinky" issue, I noticed that several people have "anti-Emacs-pinky" keybindings in their .emacs, like user "Paul Nathan" (17.5k rep as I type this) here:

What are good custom keybindings in emacs?

Then it is known for a fact that many people prefer the vi way and user Emacs' viper-mode.

I think that the major issue in Emacs is, by default, over-reliance on CTRL and more specifically C-x and C-f / C-b. These three are really terrible because it means, IMHO, painful fingers distortion.

So to me first the problem has to be defined: what is the issue? The issue is an over-reliance by default on CTRL, the fact that CTRL is typically badly located on most keyboards and the fact that most keyboard out there (I'd guesstimate more than 99.9% of all keyboards ever produced) are total pieces of junk.

So what is my solution to this?

  • I use a good mechanical keyboard and I do touch-type. People really serious about this will probably shell out $$$ for a very good split & matrix keyboard (like the Kinesis Advantage)... Because split and matrix are the only kind of keyboards that makes sense from an ergonomic point of view (this is not even open for debate). I, sadly, have been typing for three decades and cannot adapt to matrix layout, so I'm using an old (flawed) staggered keyboard. If you're going to use a staggered keyboard, at least take one that has a good switch (for example buckling springs like in the IBM Model M or Cherry MX switches or Topres like in the Happy Hacking Keyboard Pro). Be ready to shell out $500 and more if you hope to find a split + "mechanical" staggered, like the Cherry MX-5000 (*) or the IBM M15.

So: in short, if you're really serious about this, go for a Kinesis Advantage (they're using Cherry MX switches and you can even choose your specific switch if I'm not mistaken).

If, like me, you sadly cannot adapt to these wonderful keyboards because they're "too different", then go for a good "mechanical" keyboard. Any keyboard allowing not to "bottom out" while typing will save your fingers' joints. Helps after decades of programming.

If you don't want to go the "mechanical" route and think rubber domes are fine keyboards (I consider them junk but each it's preference), then at least choose a good rubber dome. MS' Ergo 4K would be a good choice (once again: it's rubber dome so to me it's a finger-destroying junk, but it's a matter of taste).

  • once you're using a good keyboard, remap CAPS-LOCK to CTRL. Can be done on any OS. It's trivial and there are plenty of links on the subject.

  • Remap Emacs' keys to stop over-relying on CTRL. First CTRL-x is terrible. It really has to be the worst shortcut ever. But you can remap ctl-x-map to what you want. I do this in my remapping minor mode:

    (define-key my-keys-minor-mode-map (kbd "C-,") ctl-x-map)

C-, might not suit you: pick something else...

Then there's the issue of cursor movement. I think it's a big one for "text editor". Even if tend to use all the fine Emacs functions to quickly move around the text buffers instead of "moving the cursor", I still do need to move the cursor "manually" quite often.

C-f / C-b have to be the two most stupid shortcuts to move the cursor ever.

I use M-{i,j,k,l}. So people prefer {hjkl} instead of {ijkl} but I like {ijkl} because it reproduce the inverted T-arrow. I also like the fact that when, as a touch-typist, you're in your home row, you already have three fingers on {jkl}. No crazy finger motion to reach 'f' or 'b': makes no sense.

Last but not least: when you're not typing, do rest your fingers on your keyboard. For this of course you need a keyboard with a good switch which has enough resistance not to activate when you're simply resting your keys on your keyboard.

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

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.

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.

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

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.

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.

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.

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.

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.

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.

I actually did my own hack to avoid using the ctrl key. I use now the SPACEBAR key. This small program for X changes the behavior of the space bar, so that when it is used in a combination, it adds the control modifier to it. When used alone, it behaves normally on release. That way you don't have to use your pinky at all! Worked perfectly for me.

I am not a programmer and I also have a hard time explaining ideas. I am on a dell mini laptop. The mouse touchpad is in a spot where my thumbs rest. My left touchpad button acts as a control key: With the side of my thumb I press it and edit in emacs as usual. I was going to map the right touchpad button to alt, but instead I have done the following: I press the button and the control key gets pressed (locked). I press it again and controll gets released. This not only made my pinky feel better it also made my editing twice as fast. (according to my org-mode clocks) It is hard to explain how nice it works. In order to do this I used the following two aplications: xbindkeys xdotool My xbindkeys config file:

###########################
# xbindkeys configuration #
###########################
# left mouse button ctrl key
"xdotool keydown ctrl"
b:1
"xdotool keyup ctrl"
control + b:1  +  Release
# vi wanna be style editing
"xdotool keydown ctrl"
release+b:3
"xdotool keyup ctrl"
release+control+b:3
# -------------------------

Before experimenting with these ideas make sure to read the man pages. Do not have anything important open. I had to kill my window manager a few times before getting it correct. notes: I use xmodmap to do all the regular stuff i.e. caps ---> control (not a full solution), swapping alt and control. (on a laptop It is ok but my thumbs cramp up) I use the window manager config file (stumpwm) to create bindings to load the proper key mapping file. (depending on my mood for the day) I am sure all this can be implemented in a different environment. My pink pain is gone, my editing is faster.

Related