reddit / emacs

How to make my pinkie and vanilla keybindings get along?

Erich_Zann21 · 2022-05-01 12:17
The deeper I delve into Emacs, the more I come to appreciate its vanilla keybindings over vim's and the reasoning behind them. The problem is, even after relatively short sessions(lasting around thirty minutes or so) of editing, I always find my pinky aching(and kinda tired as well) and setting caps lock as an alternative control key hasn't helped much, the ache's still there. So I've come here asking you, O followers of the righteous way, what kind of tricks have you adopted to make yourself more comfortable when using Emacs that don't involve splurging on super expensive ergonomic keyboards?
BettaGeorge · 2022-05-01 12:28
Adjust your chair height to your desk? This may seem like a joke answer, but I have been using emacs like six hours a day for a while now (programmer job), and my pinky is fine as long as I sit on a proper ergonomic chair. Even on a cheap standard keyboard.
char1zard4 · 2022-05-01 12:33
The two things I’ve done are set the caps lock to ctrl (which it seems like you’ve already tried) and tried out god-mode: https://github.com/emacsorphanage/god-mode In a (somewhat) vim-like way, god-mode introduces a new command mode that you can toggle with a key, such that you can enter as many commands as you want without modifiers.
wskydev · 2022-05-01 13:25
Also, consider getting an ergonomic keyboard such as the Kinesis Advantage 2. Most of these keyboards have Ctrl on the thumb cluster and have the ability to remap keys easily.
_viz_ · 2022-05-01 13:26
Swapping control and super did it for me.
fedreg · 2022-05-01 13:37
+1 for god-mode. it really helps reduce the strain on your pinky
BettaGeorge · 2022-05-01 14:09
That definitely falls into the category of "super expensive ergonomic keyboards" for me. I love Kinesis keyboards, but you should only get one if your budget allows for it without skipping your next meals.
jacmoe · 2022-05-01 14:25
I am using [Boon](https://github.com/jyp/boon), and it has transformed my Emacs experience! Tried God-mode, but it is not maintained. So I tried Modalka, didn't like it. If Boon is not to your liking, then perhaps [Meow](https://github.com/meow-edit/meow) is?
jumper047 · 2022-05-01 14:51
All you need is dual mode modifiers - remap your spacebar to act as Ctrl when pressed and generate space symbol when released. You can make it with [xcape](https://github.com/alols/xcape) on linux and with [dual-key-remap](https://github.com/ililim/dual-key-remap) on windows. It is also something for macos, but I never used it.
samsjj · 2022-05-01 15:13
Having caps lock be control key when pressed down and behave as escape when pressed and released has helped a lot. You should try it out for little more time
Horrih · 2022-05-01 15:25
Besides using caps lock as tab which you already did, One of the main thing that helped me was to get used to use ctrl and the key with opposite hands. For example don't do ctrl+b one handed even though you can. Do you use the right shift when you type on the left side ? This is not emacs related but helped me a lot ?
Horrih · 2022-05-01 15:25
Besides using caps lock as tab which you already did, One of the main thing that helped me was to get used to use ctrl and the key with opposite hands. For example don't do ctrl+b one handed even though you can. Do you use the right shift when you type on the left side ? This is not emacs related but helped me a lot ?
Erich_Zann21 · 2022-05-01 15:29
I've considered god-mode, but decided against it for mainly three reasons: 1. i like Chord-style keybindings; 2. it's unmaintained(unfortunately); 3. honestly, If I were to take the modal-editing route, I'd rather choose something with keybindings specifically designed for that way of editing, like Meow, instead of god-mode which just forces vanilla keybindings into a paradigm they were not meant for. Thanks for the suggestion though.
Erich_Zann21 · 2022-05-01 15:39
I really like Meow, it's what I'll switch to in case vanilla keybindings won't work out for me
curioushom · 2022-05-01 15:46
You could consider [home row mods](https://precondition.github.io/home-row-mods) as an option along with using alternate hands for modifier when pressing a key (as others have suggested).
Erich_Zann21 · 2022-05-01 15:47
Well well, I never thought about readjusting my chair, I did it once long ago and never tweaked it ever since, but what your suggesting makes sense, so I'll definitely take a look at it. Thanks!
Erich_Zann21 · 2022-05-01 15:49
Yeah that's a good habit I'm trying to stick to, I tend to use way too much my left hand and way too little my right hand.
oantolin · 2022-05-01 16:05
A radical proposal: just don't use your pinky to type! I don't use my pinkies, and yes, I have to move my hands around a bit, and I ceratinly don't type as quickly as people who learned "proper" typing technique, but it sounds to me like proper technique is much more likely to lead to RSI than moving your hands around a bit.
BettaGeorge · 2022-05-01 16:21
Love your username by the way. Keep playing that creepy music.
nolomg18 · 2022-05-01 16:23
Mapping capslock to ctrl is a good choice, using both hands dependi g the key you need to type with control is another goot thing. And if you just use another finger to press ctrl key rather than pinky will help you a lot. I’ve learned typping with a mechanical typewritter (yes, i’m older enough for that), and I can say you, any one of your fingers is stronger than your pinky. In the beginning you’ll feel unconfortable, but if you no desist your muscle memory will get better and there is no way back.
Meithras · 2022-05-01 17:13
There are several ways to do this, but mapping Control to the key next to your space bar (cmd on Macs and alt on PC) helps a lot. That way you can hit it with your thumb, which has the added bonus of keeping your fingers on the home keys. For me, C-q, C-a, and C-z are much easier to type than with the commonly recommended Control to Caps Lock remapping.
Walheimat · 2022-05-01 17:15
This is what made my (minor) problems go away: (whenever possible) modify with the other hand. It took me about a week to retrain, slowing down at the beginning to perform every key combo deliberately.
redblobgames · 2022-05-01 17:20
Definitely expensive. But also consider that a $240 keyboard will last 10-20 years, so $2/month, whereas homemade cheap meals are at least $100/month (in the US at least).
alternateved · 2022-05-01 17:27
Home row mods with [Miryoku](https://github.com/manna-harbour/miryoku) are a really comfortable way around Emacs vanilla bindings. But they are a time investment and require some tinkering to get timings right.
SequentialDesign · 2022-05-01 17:28
homerow mods are the only way: mod on hold, key on tap. for a comprehensive look into them, check out precondition's guide: [https://precondition.github.io/home-row-mods](https://precondition.github.io/home-row-mods) they're great! I don't use Emacs without them.
alternateved · 2022-05-01 17:32
How would you rate Boon comparing it to vanilla bindings or Meow?
timmymayes · 2022-05-01 18:25
For me the solution is using the edge of my palm to press ctrl by slightly flexing my hand. There are two key benefits here. 1. better ergonomics 2. \+2 fingers as you use ctrl so much it's truly valuable to have another way to press it. 3. Easier to do things like C-M- type commands I still recommend learning to press alternate side ctrl/alt as well for maximum ergo. Another more extreme option is to buy or build a custom mechanical keyboard with a thumb cluster like the dactyl or dactyl-manuform. Then bind ctrl to a thumb button which is a stronger digit in general.
xtifr · 2022-05-01 19:12
I've been using Emacs for decades, and basically never experience pinky problems. After talking to folks who do, I've identified some common differences between the ways I use Emacs and the way they often do. Some of these may help. Some may be unnecessary. Feel free to experiment. 1. Make sure you use *both* Ctrl keys. This should help balance out the wear on any individual pinky. Plus it just makes sense. (Also, it makes remapping left-ctrl *almost* pointless. Which is why I don't.) 2. Use M- commands more. If you're using C-f and C-b for most of your navigation, switch to using M-f and C-b to get close to where you want, and only use C-f and C-b for navigating inside an individual word. 3. Along with 2, experiment with using ESC for the M- prefix instead of Alt. This works in some cases better than others, but it's worth trying. I like using ESC with prefix digits, for example. 4. Learn to find the home row blind! This is not as hard as it sounds. If you look, you'll see that there are little bumps on the F and J keys. With a little practice, you'll find it easy to slide your hand to the right place quickly and efficiently without looking or even thinking about it. This opens up a number of options, like pressing Ctrl or Alt with the ring finger instead of the pinky, and even using the arrow keys! I've heard of other tricks (pressing Ctrl with the side of your hand, for example), but these are the ones that seem to be working for me.
mmarshall540 · 2022-05-01 20:21
The thing that has helped me the most is to create my own prefix key. I use the menu key for this, but you could just as easily use a function key or a macro key if your keyboard is so equipped. The important thing is that it doesn't require you to hold down Ctrl or Alt to get to it. Underneath that prefix key, I have bindings to simulate the C-x, C-c, C-h, M-s and M-g prefixes, along with many other commands. Because the C-x and C-c prefixes are used so often, it works great to reduce strain from holding down the modifier keys. In my view, the best use-cases for modifier keys are navigation, selection, and other commands you tend to repeat back-to-back or just use very frequently. For any command you aren't likely to use that way, it may as well be under a prefix key, but hopefully one that doesn't require hold down Ctrl. Speaking of repeating commands, here's [a little package I wrote to make that easier](https://github.com/mmarshall540/repeaters). It's a sort of "semi-modal" form of editing. Whenever a repeatable key/command is used, it activates a "repeat-map", which stays active until you use any key that's not in the repeat-map. The feature for this is built-in to Emacs since version 28. The package just makes it easier to use. Last, be sure to practice good touch-typing. I assume you use QWERTY, since most people do. So if you press C-a, you should be holding down Ctrl with your right hand and pressing a with your left. And if you press C-n, you should be holding Ctrl with your left hand and pressing n with your right. Definitely avoid the trap of pressing C-x or C-c with the same hand. Every time you press more than one key with the same hand, you're contorting that hand slightly. I would theorize that most RSI problems from using Emacs are caused by that practice.
mmarshall540 · 2022-05-01 20:38
I don't use god-mode currently, but I think it's worth considering as a way to enter prefix keys without using modifiers (as opposed to full-blown modal editing). God-mode includes `god-execute-with-current-bindings`, which lets you enter a single command using god-mode. So for example, you could have F5 bound to that command, and then you'd just press "f5 x s" to save the buffer, or "f5 x SPC b" to switch to another buffer. Just an idea. EDIT: correct example god-mode key sequence
manna_harbour · 2022-05-01 21:22
u/Erich_Zann21 Also, if you don't want to use an ergo board you can use the [Miryoku KMonad lite mapping](https://github.com/manna-harbour/miryoku_kmonad#lite) to enable home row mods on a regular keyboard. But if you build one yourself an ego split (see r/ergomechkeyboards) doesn't have to be expensive, and Miryoku is designed to prevent emacs pinkie by minimising movement, eliminating contortions, and drastically reducing the load on the pinkies.
jacmoe · 2022-05-01 23:25
Really different, because in Command mode, `jkl;` is backward by word, backward by character, forward by character, and forward by word. `uiop` is beginning of line, up by line, down by line, and end of line. Pressing `d` and a movement key deletes character, word, etc. However, most of the vanilla key bindings are available, especially in Insert mode. Pressing `v` switches to Insert mode, and I've bound `C-;` to switch back to Command mode. In many ways, it mimics the good, old WordStar way, although I find it (Boon) to be more intuitive. I must admit that I didn't see any need to check out Meow, so I can't compare it to that :) I've modified the Boon command map slightly, so that `n` narrows to subtree, `N` widens the view, and so on. I can't imagine not using it now!
11fdriver · 2022-05-02 00:40
Want to verbalise my support for the palm-pressing method, I've been using it for years and it's an excellent way to Emacs!
timmymayes · 2022-05-02 00:41
Yup. I still use it even though I have a keyboard with thumb clusters
SignSpice · 2022-05-02 02:01
As a pianist, you learn to press the keys not so much by pushing them down with your fingers, but by letting the weight all the way from your shoulder travel down your arm to your fingertips. Chair/desk alignment have a big impact on this; it doesn't really work if your arms have to reach "up" at all from your elbows. For me it is not only more comfortable to type this way, but much faster also.
ItsNildev21 · 2022-05-02 04:41
Have u tried xah-fly-keys?
alternateved · 2022-05-02 06:48
Yeah, and does an amazing job with that. Thank you u/manna_harbour for your work!
alternateved · 2022-05-02 06:55
Once I switched from evil to vanilla, I tried Meow or god-mode just to see if modal editing is still viable for me in any way. Weirdly enough, I feel now like for the most time modal editing slows me down, as it introduces yet another layer to be wary of. I have to admit though, Meow feels pretty good, especially for non-qwerty layouts. In the end I've switched to vanilla bindings and with home row mods, I am pretty comfortable. I've never tried Boon, so that is why I am curious. I would need to try it someday and see how it feels. Thank you for taking the time to answer.
SlowValue · 2022-05-02 08:10
Mapping control to the Space bar, is another option. There are several ways to achieve that. Search this subreddit for more information, the info has been published several times.
centzon400 · 2022-05-02 08:27
It's a tough nut to crack, this one, and there are no easy answers; you'll get a lot of opinions, though. Keep it simple, take breaks— hands are mechanically incredibly complex. CapsLock --> Esc (tap) and Control (hold) is great especially when your Esc is also `C-g` . Handy for The Other Editor, too. and tap left shift for open paren! For levity, the obvious XKCD: https://xkcd.com/1172/
jacmoe · 2022-05-02 09:39
It features a tutorial: `M-x boon-tutorial` :) If you only want to have movement on the home row, using your right hand, then I think Modalka is worth checking out. It's a build your own framework :) It is confusing at first, and frustrating, but after two or three weeks I had accustomed myself to modal editing, and now it's second nature...
RedditAlready19 · 2022-05-02 15:06
`setxkbmap -option ctrl:nocaps`
[deleted] · 2022-05-02 16:15
[deleted]
NoetherFan · 2022-05-02 16:16
Get a keyboard with thumb clusters, like keyboard.io
timmymayes · 2022-05-02 16:32
Xah Lee has an article on it here: [https://mihaiolteanu.me/emacs-palm-press-the-ctrl-keys.html](https://mihaiolteanu.me/emacs-palm-press-the-ctrl-keys.html) The way you activate your palm for the press is to "flatten" the hand i.e. take the pinky / ring finger from a semi-curled default position and slightly straighten them. With some keyboards you might ever so slightly tilt down on your palm side too. Really depends on your default typing posture for your hands.
by_wicker · 2022-05-02 17:27
My additional advice is to pay attention to your general level of tension in your hands. Often people are unconsciously heavy-handed. I think I might have had a little discomfort for the first few days, I'm not sure, it was a long time ago. If I did it was transient and I've had nothing for decades. The worst I had was sore elbows at one point due to resting on the chair arms - don't do that!
varsderk · 2022-05-03 01:29
The thing that solved my RSI was a really good ergonomic keyboard with copious amounts of thumb keys. I have a [Moonlander](https://zsa.io) and I have some letters (not home-row) set to modifiers. You can see my layout [here](https://configure.zsa.io/moonlander/layouts/jLR0Z/latest/0)
haroldcarr · 2022-05-03 14:08
Make the keys to the right and left of the space bar be control keys. That's where the control keys were on Symbolics machines. The entire "cap locks as control key" was/is a big mistake due to Sun Microsystems 1980s keyboards putting the control-key where the caps lock key is on most keyboards. Caps lock location as control is guarantee to cause RSI - ask me, I know from having a severe case. Since I moved it to next to the space bar, no problems.
ObjectiveNecessary61 · 2022-05-03 16:17
Try [meow](https://github.com/meow-edit/meow), another modal editing in emacs. Meow aims to blend modal editing into Emacs with minimal interference with its original key-bindings, avoiding most of the hassle introduced by key-binding conflicts. This leads to lower necessary configuration and better integration. More is achieved with fewer commands to remember.
[deleted] · 2022-05-03 16:18
[deleted]
Desmesura · 2022-05-05 11:56
I'm no longer able to use my computer (Emacs, my shell but also everything else) without remapping Right Alt to Control. Then you have both modifiers, Alt and Ctrl, under your thumbs (left: Alt, right: Ctrl). You can touch type with every key and every modifier, only using your pinkies for other keys.