78 points · by pfortuny · 4y ago · 96 comments
And after more than a year using an uncomfortable configuration for my wrist (I use emacs a LOT), I have set 'j' to behave as CTRL when hold.
And then my mind has blown up.
No more weird thumb positions, or elongated pinkies.
I had done this with one of the large thumb keys for space when pressed, Meta when hold, but I had never imagined using 'j' (or, say 'f') for that.
This essentially puts both Ctrl and Esc in a comfortable position on the home row, probably my favorite "ergo hack" ever.
Do you have an example of this configuration somewhere you could share? Or are you using something existing, like https://github.com/jasonrudolph/ControlEscape.spoon ?
I previously used Karabiner for this and as far as I can tell, the behavior is the same.
https://github.com/manna-harbour/miryoku
Before QMK, I used Kmonad and Keyd for getting these advanced features on any keyboard.
caps lock -> ctrl
tilde -> escape
left ctrl -> tilde
I borrowed this from the Happy Hacking Keyboard layout and haven't looked back since. I can now press escape with my left ring finger (right next to '1'), ctrl with my left pinky (right next to 'a'), and when I do need to type a tilde or backtick (not often) it's right under shift. On some keyboards I also map backslash to backspace and vice versa, to bring backspace closer. No more finger stretching!I'm for example using "modifier + ijkl" to send actual arrow key codes so I don't need to move to the arrows key cluster. It's not unlike gamers using wasd or esdf: ijkl mimics the arrows keys cluster. It just "makes sense". The modifier is always under my left thumb (I'm using a japanese keyboard, so the space bar is very narrow and I'm using the key at the left of the spacebar as the modifier for ijkl (and for other shortcuts). This is sweet because as actual arrows key code are sent, this works in every single program as if the arrow keys were actually pressed. I'm sure it can be even better: say by doing it at the keyboard controller level, bypassing the OS entirely but what I have works well enough for me.
Another trick: a modifier dedicated only to my window manager. Anything I need to do that is related to the WM gets done using a dedicated modifier. Never clashes with any single program. Bliss.
I do other cute things: OP mentioned using Emacs a lot... I configured things I use in Emacs all the time, like ivy / avy, to never require the pinkies (I removed the keys supposed to be pressed by pinkies from the list of available candidates).
Stuff like that. I spend countless hours on my keyboard setup and, to me, it's perfect. I did that years ago and since then I'm a happy camper.
> And then my mind has blown up.
Then I have one for you: you can use something else than ctrl to do ctrl-x in Emacs, using ctl-x-map. I'm using "key at the left of my tiny space bar + ." to do what ctrl-x does. No pinky and both hands are used (instead of doing left hand for ctrl and left hand for x).
> No more weird thumb positions, or elongated pinkies.
I don't really understand how you can get weird thumb positions on an ergodox though...
Buying a dygma raise after two failed ergodox attempts (meaning my split keyboard attempts are probably close to $1500aud) was absolutely worth it. It solved both issues, the former by supporting programmability. I can also move the keyboard to random computers without issues.
Please consider buying a programmable keyboard instead of X11 hacks, i say this as someone who put up with the problems for a decade.
I know but... I'm using a HHKB Pro JP since forever: Topre is my "end game" switch. Some modded their HHKB Pro 2 with a programmable controller but I'm not sure the mod is compatible with an HHKB Pro JP. Sadly the whole custom keyboard community is basically 99.9% cherry switches, 0.1% other switches and 0% Topre so no luck for me there.
There are physical layouts that I do appreciate but zero switch that I like (I tried everything, from Model M s to ALPS to every Cherry color under the sun) besides Topre.
> Buying a dygma raise
I cannot type on a split keyboard that has the '6' on the left part. I don't care if the travel is shorter for the left hand: I actually learned touch-typing from a secretary and she taught me to type the '6' with the right hand. Decades ago. There's no going back ; )
Conceptually it also scratches me the wrong way that left index gets to hit 4,5 and 6 while right index only gets to hit 7. It feels just wrong : )
I’m surprised the HHB line aren’t fully programmable, and a quick google hasnt found any home-rolled firmware mods. Always wondered about usb middleware that remaps keys dynamically, but I’m glad you’ve thought about it!
I am quite likely “holding it wrong” (TM) but I had to either extend my right hand too much to get to the ctrl key or was always oressing two keys at the same time.
It was probably a bad config but now… I’ve found it!
My favorite is keyd, which allows the sort of hold vs press configuration spoken of.
Thank you for the write-up, you know you wrote that for just a handful of nerds with problems like this, happy to report you helped one!
However I also have a FS3-P USB Triple Foot Switch which is surprisingly handy. Cannot map a pedal as CTRL, as it is a separate keyboard device, but esc for Vim use, and ctrl-w have been useful common keys for me to be able to stomp on.
https://www.kickstarter.com/projects/keyboardio/model-100
https://duckduckgo.com/?kp=-1&kl=au-en&q=FS3-P+USB+Triple+Fo...
The Kinesis Advantage also can have a foot pedal or foot pedals. It has to be specific ones though.
And, on Linux, this is combining `xdotool` with the native "shortcut" functionality in your desktop environment. ;)
I don't have a fancy keyboard so I have to do it in software.
My AutoHotkey script for Windows (modification of something I found online): https://gist.github.com/zanemayo/f4ff05a83630b70ea32116e761c...
My Karabiner Elements config for Mac OS: https://gist.github.com/zanemayo/04690de0a6f9783dad5a98aad5b...
One day a friends child was visiting and I put some games on for her. The little bastard somehow reprogrammed the 'r' key to empty macro, it took me weeks to find out what it was.
Programmable keyboards offer so many improvements, it’s incredible.
Some of that can be done with xinput on Linux, but as far as I know the different-key-when-held functionality is not available there. [Edit: yewenjie’s comment mentions keyd which apparently does have that feature! https://news.ycombinator.com/item?id=31146572] While I waited for this one to be delivered (was a crowdfunding campaign) I used that to simulate some of its features and surprised myself when I found out that I stopped using the dedicated cursor keys even if all my keyboards had them.
I had never thought of using J for CTRL. You lose the ability to enter Line Feed (Return) with CTRL+J which I do use from time to time, but it sounds intriguing. I might try it out one of these days.
Why do you lose ctrl-j? There is another ctrl on the left side of the keyboard. Uh?
:-D Yes indeed, you are absolutely right. I had assumed that those keys would be used for something else but nothing stops you from having several CTRL keys.
I am going to try this with my kinesys at work. The ergodox I have is for home.
I remap caps-lock to ctrl on all my computers. Even my Chromebook allows this. Make Emacs much nicer to use.
The fact that it is expensive has nothing to do with it (I bought it for my rsi).
However, I think expensive keyboards (like the moonlander or the planck) are worth it for things like "symmetrical" and "thumb can use more keys than just the spacebar".
But the ergodox has such a nice programming interface that it makes the OS-level configuration pale in comparison.
[0] https://gist.github.com/ivyxjc/0ee9b1f37a5abdfbcd8f31db3c10f...
Much of the point of the Ergodox is that it's completely reprogrammable, and ZSA's Oryx makes that very easy for the Ergodox EZ and Moonlander (which I've just gotten). For other keyboards running QMK the QMK Configurator makes it relatively easy too, except for macros (I also have a Hotdox Ergodox). I use the keys my thumbs sit on as space on the left and enter on the right, and holding space as shift and holding enter as control. I use the two little finger home keys (A and I in the Workman layout) as letters when tapped and layer switchers when held. Left gets me symbols and numbers, and right gets me movement, editing, and more symbols.
You can also make keys act like modifiers are held down, e.g. a single key that does shift-enter for Jupyter notebooks, or ctrl-C, ctrl-V, etc. You could probably set up a whole Emacs layer or two like that. I also use autoshift, so a long tap on a letter key gives you the capital letter (this makes held letters as modifiers a bit less convenient).
With these keyboards I never move my right little finger to the right, as doing that on normal keyboards is really damaging my right wrist (hence spending hundreds of dollars on programmable keyboards with lots of thumb keys). I've been trying similar things in software for a while with AutoHotKey and sxhkd, but concluded I needed to do it at a lower level. UInput is an option for that on Linux, but programmable hardware is better I think (just expensive).
Since getting these keyboards one and two weeks ago I've modified the layout at least once a day on average, refining it further and further. Currently it's this: https://configure.zsa.io/moonlander/layouts/xDQXL/latest/0
- You can have multiple layers
- You can choose "a" to act as your control key when held down, but create a "gaming" layer that disables this feature, so you'd have your "WASD" direction keys back for the game and hold them down to move around.
- You can have a mouse layer, which mean if you hold down a key, some other keys will control your cursor. I normally use this to scroll up/down (mouse scroll buttons) wherever page up/down keys don't work.
- You can add snippets and macros to some keys to automate something you type a lot (your email for example).
- You can configure the keyboard in a way that your finger don't need to travel more than one key away from the home row.
I've been thinking about observing my typing / window interaction patterns and optimizing them, but never could find the motivation. Sometimes I catch myself pixel-hunting some control in my IDE and wondering if there is a shortcut for it, but then again, is configuring/learning the shortcut worth the trouble?
Or maybe configurability benefits kick in after a threshold? I think there is a reality where I can be at least 5% productive by just streamlining my "head-computer" link, but I'm not sure what it's going to take to get there.
I've got myself Moonlander, and when I started to configure it, I realised that this is an uphill battle: I need to configure both base layer and the keyboard layout in software (there is no keycode for Cyrillic D or ZHE: so they've got some random keycodes for ASCII keyboards).
Add in any customisation I might want, and this turned into a full monthlong project.
So back to only Caps-as-ctrl for me for now.
Also see: https://mihaiolteanu.me/emacs-palm-press-the-ctrl-keys and http://xahlee.info/emacs/emacs/swap_CapsLock_Ctrl.html
It became so natural that normal keyboards became hard to use.
The 'caps lock' and 'control' keys were swapped as compared to todays keyboards!
edit: fixed link
I have also used all the linux/mac tools for other keyboards but honestly, everything pales in comparison with ergodox’s configuration tool and with being able to program ordinary keys and see it work BANG like that. I just wanted to share this because honestly it blew up my mind.
You are welcome !
https://gist.githubusercontent.com/sourcevault/f6623662bea27...
here is the code.
Also, fuck RMLVO, let live KcCGST.
Left Alt -> Ctrl
Meta ->Alt
Cpas Lock ->Esc
CPU-based could be easier.