Programer Hand Health: vi Esc Key Syndrome

Master emacs+lisp, benefit for life. Testimonials. Thank you for support.
,

In the past month, my left hand wrist started to feel funny. Especially yesterday after several hours of heavy coding. Not pain yet, but distinctively something is wrong. The closest description is tingling, and tingling sensation is the first symptom of RSI.

(Been using emacs for like 16 hours per day for the past 6 months. Especially in the past 3 months. No it's not a exaggeration. Hard to say the exact hours my fingers are actually typing, but literally from the time i wake to the time i sleep i'm in front of comp, and about half of that time i'm inside emacs.)

I am fairly a keyboarding expert. I use a fancy ergonomic keyboard (since 2005). I use the Dvorak Layout (since 1994). I use a ergonomic emacs keybinding set (since 2007). I have extensive Operating-system-wide custom-designed shortcuts to save keystrokes. I read extensively on all things related to keyboard, in the past 20 years. 〔☛ Keyboards, Layouts, Hotkeys, Macros, RSI

So, it is a slap to my face, that i might be developing repetitive strain injury (RSI). I am quite puzzled on what's the cause.

Is it the emacs chording? No, i don't find any evidence tracing to that with my system. Is it lack of breaks? No, i take at least 7 min walk every 2 hours. I thought it's because i played too much first-person shooter in Second Life. (because i use left hand for mousing. (btw, i use 2 mouses, one for each hand, and i alternate mousing hands without thought, whichever comes handy at the moment. Been doing this since 1995 or so.)) Certainly playing first-person shooter didn't help, especially when you get intense and got immersed in the game to kill your opponents, and this can happen for hours unconsciously.

Perhaps, 10+ hours a day keyboarding is just too much? I was guessing the problem is Second Life combat, but can't be sure. But today, i found out why.

Cause: Wrist Side-To-Side Motion

It's the goddamn keys like {1, 2, Tab ↹, Esc, `}. In a sentence, perhaps it is best understood as “vi Esc key syndrome”.

One way to know your problem is to have a camcorder pointing at your hands for the whole day. Then, play them back with increased speed. When you watch the video, you can clearly see what's the most repetitive motion. (This technique is widely used in athlete training to monitor habits and movements. (i know because i was in college swimming team in around 1992 to 1993, and have been subjected to this by our coach Ron Oburn, once.))

I don't have a camcorder and didn't bother to do this. Nevertheless, little hints and thoughts made it clear.

The 1, 2, Esc, Tab keys are on the extreme left side of the keyboard. Let's say the 1 key, which is the most frequently used digit. How you press that depends on person. You can flatten your palm and extend your pinky. This is the method traditionally taught in touch-typing. However, i remember about a year ago i find this way to be too slow and cumbersome on the Microsoft Natural Ergonomic Keyboard 4000 i am using. I press the 1 key by bending my wrist leftward, then use my middle finger to press 1. This means i move my wrist in a horizontal left/right motion a lot.

Also, in ErgoEmacs, splitting window is done by 【Alt+2】, and expanding the current pane is done by 【Alt+1】, and closing all other panes is 【Alt+⇧ Shift+1】 (【Alt+!】). Window expanding and spliting are two of the most frequently used emacs operations. 〔☛ Emacs's Command Frequency〕 So this increased a lot the frequency of my left wrist's left-right movement.

Also, in ErgoEmacs, 【Alt+`】 and 【Alt+~】 are for switching next/prev windows in emacs. (i.e. what emacs calls “frame”; 【Ctrl+x 5 o】). I almost always have 2 windows in emacs.

In the past few days, before this discovery, i have attempted to reproduce hand movement that would cause this tingling sensation, but just couldn't pinpoint. Now i know. Now, if i just emulate the motion of my left hand trying to type the 1 and back to normal typing position, TINGLE! Move my hands away from keyboard, then try to move my wrist left/right, Tingle! Don't laugh, because it's very unpleasant. (and i shudder to think about it, because many programers have permanently damaged their hands by typing.)

Solution

The solution is quite simple. Here are some suggestions.

• Do not press the 1 key using index finger. Same for all the other keys there (Esc, `, Tab ↹, 2). Press them by moving your whole arm to avoid wrist bending. (Pressing them by extending pinky will probably cause a different problem.)

• Avoid heavy use of these keys. If your software need them frequently, remap them elsewhere using keyboard macros software. Map them to function keys, or modifier combo with easier keys in positions of 3, 4, 7, 8, 9. If it means slower operation, keep in mind that your hand health is more important than saving of little seconds.

for key macros tools, see:

Personally, i use:

This also means, my ErgoEmacs keybinding will be changed. 【Alt+1】, 【Alt+2】 won't be for splitting windows. When i designed them, those choices were sloppy without thought. They were based on mnemonic, similar to emacs's default 【Ctrl+x 1】, 【Ctrl+x 2】. But now i know how bad these choices were. I'll create a new version with new binding for spliting window functions. For now, you can put the following in your emacs init file:

;; remove some default
(define-key ergoemacs-keymap (kbd "M-1") 'nil)
(define-key ergoemacs-keymap (kbd "M-!") 'nil)
(define-key ergoemacs-keymap (kbd "M-2") 'nil)
(define-key ergoemacs-keymap (kbd "M-@") 'nil)

;; new
(define-key ergoemacs-keymap (kbd "M-3") 'delete-other-windows )
(define-key ergoemacs-keymap (kbd "M-0") 'delete-window)
(define-key ergoemacs-keymap (kbd "M-4") 'split-window-vertically)
(define-key ergoemacs-keymap (kbd "M-$") 'split-window-horizontally)

The above takes out the ispell-word command. If you use that, remap it somewhere. I remap it to the keypad's 4. ((kbd "<kp-4>")) (other numbers are already used. I use the keypad keys as function keys. If you don't use the operating system's Calculator, the keypad is very useful as extended function keys. Can be system-wide or app-specific.)

Note: the original design of Dvorak layout has numbers arranged like this:

1 2 3 4 5     6 7 8 9 0  ← normal
7 5 3 1 9     0 2 4 6 8  ← Dvorak

The 1 would be today's 4, which is most easily typed for that row for left hand.

I'm sooo very happy i discovered this problem.

Addendum: ErgoEmacs keybinding has been updated with this change.

Stiff Spacebar on Microsoft Ergonomic 4000 Keyboard

My left hand is whacked. No pain yet, but something is getting seriously wrong.

Couple weeks ago, i wrote long about my realization that the problem was the left hand wrist motion to press the {1, 2, Tab ↹, …} keys by the bad habit using my index finger. (causing excessive side-to-side wrist motion)

I made lots of changes in my habit and keybinding. I learned a whole lot more intricate detail about keyboards and habits, and things are going well; no more tingling sensation, because i have stopped the habit of moving my wrist side-to-side, not a bit, even i still type many hours a day.

But this morning when i woke up, my left forearm, the area under it, there's some twitching going on. Very slight, some vague sensation best described as tingling goes along with it, and i know it is BAD. I think because i typed too much yesterday.

I realized that i was wrong to think that side-to-side wrist motion was the only cause of my problem. APPARENTLY, LEFT HAND'S THUMB BENDING INWARD TO HOLD THE ALT KEY can also cause a problem if done too much.

At the moment, i'm not sure i can pinpoint any particular habit or keybinding motion to blame. I type on Dvorak, and Dvorak uses right hand keys 14% more than left. But i don't have any problem with my right hand at all (PS, when writing this paragraph, i just realize that i always use my left hand to type the space bar. That could explain it!)

Am sending this out here as a warning to anyone who does heavy typing. Apparently, ErgoEmacs's ways of using Alt cannot solve prolonged typing.

Addendum: As of today and past year, i have no problem whatsoever. I suspect that the problem before came from the stiff spacebar on the Microsoft Natural Ergonomic Keyboard 4000 (i use left thumb to press Space, and space is by far most used key than any letter.). It's a well known problem of that keyboard. I have stopped using that keyboard.

See also: Emacs, RSI, My ExperiencesEmacs Keybinding Rant & a Glimpse of Xah Lee's Life 2010.

Like what you read?
Buy Xah Emacs Tutorial
or share some
blog comments powered by Disqus