Hacker News new | past | comments | ask | show | jobs | submit login
Why Emacs keys are painful (2007) (ergoemacs.org)
34 points by deepaksurti 49 days ago | hide | past | web | favorite | 29 comments



The first thing i do on any new system is to rebind Caps_Lock to be a duplicate L_Ctrl.

this solves 90% of my ergo issues/pinkie pain, and not just for emacs use.


Vim user here. I've mapped Caps_Lock in such a way that a tap imitates Esc(to quickly switch modes) and long press imitates Ctrl(to use some good insert mode features).


Yeah. That's what everyone does. The other common modification is to put an Alt/Meta on whatever key is below the shift key (which varies by keyboard design), so Meta is always available from the other pinky.

(In other universes, some users will also do this trick so they can hit ESC with a Ctrl-[ chord that is available from the home row. But I never understood why they were reaching for ESC in the first place.)

Yet this article appears not to know about or care about this overwhelmingly pervasive convention that fixes all the problems it's talking about?! Skip.


After using a Mac for a while, I realize how easy the cmd key combinations are to press. They are easier than the ctrl key combinations.

I think it would be useful for Emacs to swap cmd and ctrl.


Cmd key combinations are one of the things that keep me coming back to macOS. Far more ergonomic than ctrl and just requires you to move your thumb (which typically would hover over cmd key anyway). It’s one of those things Apple did right back in the day.


That's precisely what this article is pointing out (though it's flawed in other ways). Apple put the Cmd key where Symbolics had a Ctrl.


Actually, let me set ns-alternate-modifier, ns-command-modifier and ns-control-modifier, and see what happens. It sure takes some getting used to!


    (setq mac-command-modifier 'control)


When I'm not on a laptop (on which I, too, remap CTRL to CAPS), I use a Kinesis Advantage 2 and remap (in hardware) the bottom-most row so my pinky is CMD / SUPER and my ring finger is META, and CTRL is on my middle finger , so all I have to do is go straight down to hit it, and this has eliminated the most of my problems. However, I also use Dvorak, so that plays into it a little.


I do the same thing in vim with Esc <-> CapsLock


If you've a sufficiently decent input manager or a programmable keyboard, you can have Caps Lock play double duty as both. I am an emacs and evil user, so I have tapping caps configured to send ^] and holding it to ^. Best of both worlds!


It was almost life-changing when I figured out how to do that on both my work Macbook and my home Linux machine. As another evil mode user I second what you said


I use a Mac, and it sounds like an interesting feature to have. How to do it?


I use Karabiner https://pqrs.org/osx/karabiner/ and then used one of the Caps lock modifiers in https://pqrs.org/osx/karabiner/complex_modifications/#caps_l...


Another possibility is to not use the ESC key in vim. ESC just sends CTRL-[, and with your hands in normal position on the keyboard, CTRL-[ is fast and easy to type.

With CTRL mapped to directly left of the left pinky (the CAPS LOCK position on most keyboards), then an ESC via CTRL-[ is just a slight pinky movement on both hands.


If you love emacs's functionality and prefer vim's key bindings, you may find http://spacemacs.org/ useful. Its org-mode support is amazing.


Performance issues of emacs (made much worse by many layers of plugins), combined with vim’s counterintuitive bimodality, originally meant to compensate for slow terminals? Thanks but no thanks; for me, Spacemacs took the worst from two editors. I love the eye candy, though (when it works); however, it’s not enough to compensate said curious choice.


I rarely see any performance issues, even when running spacemacs over ssh. The only issue I have is start-up time and there are ways to speed that up.


I run it as a daemon that is managed by systemd. The startup time is the time it takes for my window manager to create a new window.


"Emacs actually comes with a builting Emacs Aptitude Test. Do you remap your keyboard or the Emacs keybindings before the chords and sequences it comes with by default have wreaked havoc with your hands? If you do not do anything to make Emacs more convenient for yourself, you may not have the prerequisite aptitude to use it productive."

Thus spoke Erik Naggum, who, IIRC, didn't always agree otherwise with Xah Lee back in the glory days of comp.emacs.


I used to think the term "emacs pinky" was a joke, until I had the opportunity to use it full-time. Within a few weeks, my pinky started to hurt, and pressing the Ctrl-key was especially painful. Not unbearable, but still, pretty annoying.

Then I found out how to turn CAPS LOCK into an additional Ctrl, and ever since it has been one of the first things I do on a new computer. I only ever used CAPS LOCK by accident, anyway, so it's a double win.


In addition to the recommended CapsLock ⇒ LCtrl rebinding done on the OS level, there are also several things you can do within Emacs to edit and navigate comfortably.

For example, you can add this to your ~/.emacs:

    (global-set-key [f8] 'view-mode)
This lets you quickly enable and disable view-mode, using F8. In view-mode, you can use SPACE and BACKSPACE for scrolling, which is useful for reading longer documents and files.

With a Dvorak keyboard, navigation is also more convenient, since for example C-n and C-p are at the respective locations of C-l and C-r on US keyboards, so that both hands are regularly used and not used.

Other than that, I recommend to also use search for navigation, and to occasionally read and re-read the first chapters of the Emacs manual: There are many useful commands that can help a lot if you know them and their prefix arguments.


Thanks for the suggestion to use view-mode. I bound a quick double-tap of vv.

    (use-package key-chord
      :init
      (key-chord-mode 1)
      ;; (key-chord-define-global "jj" #'avy-goto-word-or-subword-1)
      (key-chord-define-global "vv" #'view-mode)
      :custom (key-chord-one-key-delay 0.3))


The point about central Alt vs corner Ctrl is important, and it's unbelievable how Windows and Linux have messed this up.

A primary modifier right beside the space bar is incredible because the thumb is the strongest digit, whereas the pinky is the weakest (on the hands)―and shares a tendon with the ring finger.

It's doubly great with a big bottom row like on MS Natural keyboards: you just mash these big blobs which are right under your thumbs, instead of aiming for minuscule keys in the corners with your most pathetic fingers.

Macs have Cmd as the primary modifier, located on both sides right beside the space bar. Apps use Cmd for shortcuts―while Alt and Win keys aren't free to remap for most programs. So Mac users had this experience for decades now, and in the meantime afaik Windows and Linux haven't even attempted to correct the mistake.

(A bit ironic how MS keyboards' layout works best on a Mac.)


For Ctrl, I recommend pressing it with the knuckle of your little finger. There's a photo of the technique here, about halfway down: http://ergoemacs.org/emacs/emacs_pinky.html

The main advantage of this over rebinding Caps Lock: it keeps the meta keys symmetrical, so you don't have to faff about rebinding Enter, or wonder about how you're going to solve the issue of hitting Ctrl with your right hand.

(Lee recommends not doing this, citing unspecified issues with the little finger. For whatever it's worth, probably not much in the face of that kind of argument, I've been doing this for about ten years now and haven't noticed any problems. I'm afraid you're just going to have to make your own decision here.)


On some desktop keyboards (like mine) it's also possible to press each control key with the metacarpal phalangeal joint on the respective hand- that's the bit of bone and sinew at the base of the pinky finger [1]. Or, you can always move your palm to the side and hit CTRL with your thumb, but that means your fingers must leavet he home row.

I often use my thumb to press Ctrl+E/D to scroll up/down in vim.

_____________

[1] https://en.wikipedia.org/wiki/Metacarpal_bones#/media/File:M...


Has anyone seen any interesting keyboard-plus-multitouch hybridization? For illustration, say left hand on kbd and right on a graphics tablet? Or laptop touchpad thumb-based modifier keys? Or, less likely, interesting things to do when keycaps are touchpads?

Last year I was working on optical finger tracking to get 3D positions and entire keyboard as a multitouch surface. It's not clear I want to continue banging on it this year. So I'm fishing for an "oh, that's a neat idea... ok, yes, I do want that" motivating instance.


I got two different issues with my hand (RSI and Wrist pain) after coding for 7 years and that was when I switched to VIM keybinding pretty much everywhere even in my web browser (Vimium). I'm also using Kinesis keyboard with a lot of mappings to have all modifier keys under my thumbs.

It is one of those things like smoking! You always hear it is bad for you and you always think it only happens to others and never happens to you.

That is my advice to everyone now. Either don't do touch typing, or you should use a better keyboard layout and VIM keybinding to avoid stretching too much.


Tagged as 2007 but the article date says “Last updated: 2018-12-18.”




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: