• You are not logged in.

    Emacs ergonomic shortcuts

    • Started by Ghoul
    • 8 Replies:
    • Reputation: 0
    • Registered: 04-Nov-2008
    • Posts: 17

    The default emacs keyboard shortcuts aren't very ergonomic - http://xahlee.org/emacs/emacs_kb_shortcuts_pain.html

    According to Xah Lee and his dive into the most frequent emacs commands he reached the following results: http://xahlee.org/emacs/command-frequency.html

    These results have been used to create the following emacs shortcuts layout: http://xahlee.org/emacs/ergonomic_emacs_keybinding.html

    If it's a bit too much to go cold turkey, you can do like I did and make a gradual adaptation - https://code.google.com/p/ergoemacs/wiki/adoption

    Step 1
    The most frequent commands are the cursor movement commands thus add this to your .emacs file:

    ;; Single char cursor movement. (assuming you are on qwerty)
    (global-set-key (kbd "M-n") 'backward-char)
    (global-set-key (kbd "M-i") 'forward-char)
    (global-set-key (kbd "M-u") 'previous-line)
    (global-set-key (kbd "M-e") 'next-line)

    ;; kicking the habit
    (global-unset-key (kbd "C-b")) ; backward-char
    (global-unset-key (kbd "C-f")) ; forward-char
    (global-unset-key (kbd "C-p")) ; previous-line
    (global-unset-key (kbd "C-n")) ; next-line

    Once this feels alright proceed the gradual adaptation from the page above.


    So far there has been only a qwerty and dvorak version. However now I maintain colemak version here: https://code.google.com/p/ergoemacs/downloads/list

    Just grab the latest snapshot from there and enjoy :)
    Worth giving a try.

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,361

    Nice work there from the looks of it (I don't use Emacs myself so I can't comment on details).

    The UNEI nav block has been implemented, and LY for word movements. You use shift-LY for paragraph moves, which I suppose is alright; another suggestion (used in Shai's Vi mappings) is Home/End of line.

    In the Vi mappings, JH is used for page up/down, which I find works well. I'm now using O for enter, [ for Esc and }; for Del/Back, but there are variations in those mappings.

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • Registered: 04-Nov-2008
    • Posts: 17

    Home/End is too far away to reach.

    In this case, what I use is Alt+UNEI for navigation. Alt+LY for forward/backward a word. And Alt+UE for page up/page down. Really really intuitive and easy to learn. Also more ergonomic than the defaults Ctrl-FBPN (standing for Forward Backward Previous Next) and Alt-F/B for Forward/Backward word.

    As for O - Enter and [ - Esc it's the same as what I'm doing - remapping most common commands to the Alt key on Emacs.

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,361
    Ghoul said:

    Home/End is too far away to reach.

    Huh? I have Home/End on shift-LY; how is that too far away? Sorry if I'm misunderstanding you.

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • Registered: 04-Nov-2008
    • Posts: 17

    Oh, don't know why but I was thinking the Home and End keys which are far away :)

    So far I have them remapped as Alt-h (home) and Alt-H (end).

    Offline
    • 0
    • Reputation: 0
    • Registered: 20-May-2009
    • Posts: 7

    So why the neiu navigation as opposed to vim's hnei? It seems like not having to reach for the top row would reduce unnecessary stress.

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,361

    I believe that the index finger reach inwards is just as stressful as the middle finger reach upwards, if not more. Either way, one finger has to take care of two directions. Both the index and middle fingers are very strong, and the index finger is the most overworked of them albeit probably the stronger by a small measure ('strength' referring to typing ability, not raw force or any such measure).

    After thinking keyboarding through a lot, I've come to the conclusion that the middle and ring finger may quite easily reach to the row above the home row, as long as the wrists are kept straight. This incidentally means that the QWERTY 'E' isn't quite as horribly placed as I first thought it was, heh. The right-hand's middle finger reaching for 'U' doesn't feel at all stressful to me at least - which is nice, given that all the most common letters in English (ETAOINSHRDLUCMF) are then within easy reach. (The 'C' and 'M' are a bit tricky for their frequency, especially in the 'sc' digraph I think, but they were kept in place which is a good decision I think; moving the 'C' to the Colemak 'F' position for instance wouldn't really solve anything and would make it harder to learn and use. But I digress.)

    The UNEI scheme is similar to the arrow key block and the ever-so-popular WARS (WASD in QWERTY) navigation blocks. These are used a LOT for other applications, including games where you have to be quick and efficient. I feel that it's more intuitive than the old Vim scheme.

    In colemak.vim (by Shai), it's also used. And in PKL's default 'extend' mappings (which are extremely useful for a Windows user!).

    Last edited by DreymaR (20-May-2009 09:49:40)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • Registered: 07-Aug-2007
    • Posts: 69
    DreymaR said:

    I believe that the index finger reach inwards is just as stressful as the middle finger reach upwards, if not more. Either way, one finger has to take care of two directions. Both the index and middle fingers are very strong, and the index finger is the most overworked of them albeit probably the stronger by a small measure ('strength' referring to typing ability, not raw force or any such measure).

    After thinking keyboarding through a lot, I've come to the conclusion that the middle and ring finger may quite easily reach to the row above the home row, as long as the wrists are kept straight. This incidentally means that the QWERTY 'E' isn't quite as horribly placed as I first thought it was, heh. The right-hand's middle finger reaching for 'U' doesn't feel at all stressful to me at least - which is nice, given that all the most common letters in English (ETAOINSHRDLUCMF) are then within easy reach. (The 'C' and 'M' are a bit tricky for their frequency, especially in the 'sc' digraph I think, but they were kept in place which is a good decision I think; moving the 'C' to the Colemak 'F' position for instance wouldn't really solve anything and would make it harder to learn and use. But I digress.)

    The UNEI scheme is similar to the arrow key block and the ever-so-popular WARS (WASD in QWERTY) navigation blocks. These are used a LOT for other applications, including games where you have to be quick and efficient. I feel that it's more intuitive than the old Vim scheme.

    In colemak.vim (by Shai), it's also used. And in PKL's default 'extend' mappings (which are extremely useful for a Windows user!).

    With the (original) vi scheme, you can use two different fingers to move the cursor back and forth on the same axis, oscillating freely until it damps it to the position you want.  With the UNEI scheme, this kind of almost "analog" oscillate-and-damp capability is sacrificed for vertical navigation (where it is more needed in my experience).

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,361

    Sounds nice, but if I can play Street Fighter Alpha 3 with a WARS key block (haven't tried it with a linear one but I don't see anyone doing that either) it's a very good navigation scheme! In such games you have to oscillate a lot and not just along one axis at a time. You may have a point that text navigation is mostly conducted monoaxially but I don't think it matters much. You shouldn't be 'oscillating' wildly at any rate!

    If the linear nav block were as good as a crossed one, I have a feeling that more laptops would come with that instead of a cramped arrow cross. Now that could be social impetus, but I feel that the cross is just more intuitive, while being at least as strong.

    As already mentioned, the middle finger is really strong and feels less overworked than the index finger beforehand.

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0