That means that 'j' is entered upon key release, while all other keys are activated upon key press. That slightly different behaviour on just one key would make me go crazy.
You could easily configure all of your keys to behave that way with no loss in functionality. The whole concept of "key press" versus "key hold" assumes that a "press" is released instantaneously.
No loss in functionality, but it adds tens of milliseconds of delay when typing.
Also, when using Emacs I often press and release the ctrl key without completing a control sequence, like when I'm thinking about scrolling but change my mind. I'd be splattering Js all through my source files.
> No loss in functionality, but it adds tens of milliseconds of delay when typing.
Well, no, it would add zero milliseconds -- and zero nanoseconds -- of delay. The difference between key press and key release does not affect typing at all. You're not waiting to see what happens after you press T before you go on to pressing I (or whatever letter you're following it with).
I disagree. Input-on-key-release feels very bad if you're used to it being on key press like all computers do. It feels like the keys are sticky and unresponsive. It's hard to explain unless you try it.
When I'm typing normally, keys are down for around 60 mS each. Having the software respond at the end of that 60 mS instead of the beginning adds about 60 mS of delay.
I can't discern the difference between those tens of milliseconds of delay.
Worth considering the time (and effort) saved from moving the hands to the modifier keys. It's nice being able to have the hands remain on the home row.
EDIT: rather, there's hardly any speed lost (if any); but there's a big amount of comfort gained from using home row mods.
> Also, when using Emacs I often press and release the ctrl key without completing a control sequence
The behaviour is customisable, but e.g. if you're holding the tap-hold key for longer than a 'tap', then it'd still register as a 'hold' rather than sending a 'tap'.
You may also notice if you're typing a word; say 'jeans' and you press the e before you release the j. On a typewritter, you must release the first key before you press another, or you get a jam. On a computer, you don't usually have to, but with this configuration, it gets tricky. If j becomes control when held, you've got to start buffering key presses when j is pressed, and only once j is released (or held long enough) can you send the key presses on. I hope you're not playing a game which uses j, because your inputs now have jitter.
> I hope you're not playing a game which uses j, because your inputs now have jitter.
Well, if you've got tap-hold on the keys "ASD", then games with WASD movement will be hard to play. :) -- I have a gaming layer without the tap-hold keys, separate from the normal typing layer.
Take a look at the ultra compact layouts like Miryouku - it has six layers and home row modifiers (Shift, Ctrl, Alt, Super all as tap dance keys on home rows).
Kmonad is great! Much easier to configure than some of the standard Linux keyboard tools and can be reloaded quickly. I'd recommend it to anyone that wants to try out a new layout or do some fairly painless remapping.
I have a keyboard with GMK firmware. This is fairly easy to do. In combination with layers, my hands don't have to move around as much. Easier on the tendons and possibly faster.
On a different programmable keyboard, with a more traditional staggered layout (the ErgoDox has a columnar layout where where keys are aligned horizontally) I used that same function but on Caps-Lock, left of A: press it combined with another key, it is CTRL; press it alone, it is ESC.
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.
You already mentioned Keyd but Kmonad also has that feature. Kmonad seems a bit more powerful but is a bit harder to configure than Keyd especially for something simple. Kmonad is also cross platform. The cool thing about them is that they work everywhere and not just in Wayland or X11 so it all just works in TTYs too.
I became an unwilling victim of such feature in my Razer gaming keyboard.
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.
Most operating sytems allow remapping of keys, and at least for the common modifier keys (shift, ctrl, alt) make it pretty easy. You don't need an expensive programmable keyboard.
I remap caps-lock to ctrl on all my computers. Even my Chromebook allows this. Make Emacs much nicer to use.
Oh no, this is totally different (I also have an old kinesys at work and program caps etc. as I wish): here you can turn any other key into that… Even keys which are usually not part of a combination.
The fact that it is expensive has nothing to do with it (I bought it for my rsi).
Even for the tap-hold functionality, there is kmonad.
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".
Its all in the milliseconds, but I think Windows, Settings, Ease of Access, Keyboard offers more options even though its designed and intended for less able people to use, it has its own customisable potential most people overlook.
One of the first things I do on new computers is download a macro software (i.e AutoHotkey(1)) to remap troublesome keys on normal keyboards. The quick list I have going on this particular laptop:
a) numlock always off(on?)
b) remap right alt to be 'function' key for the f keys that double as volume up/down/mute
c) remap '%' to be ctrl+`, as I use it quite often for autocomplete in a DB front-end
Sxhkd and espanso together are closer to AutoHotKey, but still not comparable, unfortunately. Adding uinput to the mix gets closer (and in some ways further), but requires custom coding.
I use caps2esc [1] in Linux to remap capslock to ctrl on hold and esc on tap. It's such a simple yet insanely useful remapping! It really shines in modal editing (e.g. vim). I assume it's possible to use the underlying interception tools [2] to do that for any key without needing a particular programmable keyboard.
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.
This is pretty nifty, thank you. You are probably aware that you can do somehow advance remapping within Desktop Environment or Tiling manager level. KDE is decent. I mutilated i3wm config with Xbindkeys and Xmodmap. Keyd feels like a vastly more sane approach, not to mention the inevitable death of X.
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!
This is part of the fun of customizing a small keyboard. You experiment with different key layouts until you find the perfect one for you and learn it, making small adjustments along the way. I currently use a 36-key Draculad and the most fun customization was making Cmd+Tab ergonomic (there’s no physical Tab key).
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 haven't used a Happy Hacking Keyboard, but why not left ctrl -> escape and tilde remains tilde? Perhaps it's just my hands but I feel reaching left ctrl is easier than reaching the tilde key, and I imagine hitting escape is more frequent than tilde (?)
Hmm, it's the opposite for me, somehow reaching my ring finger toward tilde just feels easier than curling my left pinky downward toward left ctrl. Plus my muscle memory is used to moving up and to the left to find escape.
I don't get it. There's already a ctrl on the left reachable with left pinky. What is missing is right-ctrl which you often need (tmux, vim, emacs...).
Similar to caps lock being ctrl when held and escape when tapped, I set up return to be ctrl when held and return when tapped. Nice keyboard symmetry this way too.
On a French keyboard, the 'tilde' key (left of the 1) is the symbol '²' which I hardly ever use.
Therefore I remapped it to the € symbol using AHK. No more AltGr key combination to get it! (and I keep the '²' symbol with shift-'tilde')
I'm using a very custom keyboard configuration and I'm doing all my config using Linux's xkb (X Keyboard Extension).
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...
I use Dvorak and work on a diverse range of systems (rdp, Citrix, vms, etc). The biggest technical problem is random software not respecting your host OS key map. I also get bad knots in my back from unsplit keyboards.
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.
> 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 : )
Sorry I literally meant consider, not ‘you must’ in a passive aggressive way :)
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!
For those on Windows I have to plug [PowerToys](https://github.com/microsoft/PowerToys). In addition to the excellent "Video Conference Mute" it has the best key/shortcut remapper I've used on Windows. Fully open-source, but can be downloaded from the MS Store (gets auto-updated) too.
As a software rather than keyboard hack, I've been using and loving the following setup on macOS:
* Remap Caps Lock to Ctrl
* Then use Hammerspoon[1] to map Ctrl(hold) / Esc (momentary press)
This essentially puts both Ctrl and Esc in a comfortable position on the home row, probably my favorite "ergo hack" ever.
I have it set as a "super" modifier, i.e. cmd + ctrl + option + shift, perfect as then you can use it as a modifier for shortcuts as no programs use that a default keyboard shortcut
Is there any applications for Linux which allow remapping keybindings on a per-application basis? I’d kill to remap chrome/FF keys, but afaict both browsers don’t allow this.
xkeysnail if you use Xorg. For Wayland, (sway) I applied a patch to make it work. If the window manager exposes the current focused window, then it's possible to make it work with xkeysnail.
Back in the Apple II days. Caps Lock was actually a locking switch too, at least on my IIc. The Model F shipped with the IBM PC also had CTRL there. For some reason with the AT they decided to put CTRL in the corner and Caps Lock along home row.
To OP and people who elaborately configure their keyboards - is it worth it? Does it improve performance by a meaningful amount?
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.
Honestly, the biggest improvement for me has not been typing performance, but ergonomics. Being able to remap common shortcuts to things that don't stress my aging joints as much has been fantastic
97 comments
[ 4.7 ms ] story [ 151 ms ] threadAlso, when using Emacs I often press and release the ctrl key without completing a control sequence, like when I'm thinking about scrolling but change my mind. I'd be splattering Js all through my source files.
Well, no, it would add zero milliseconds -- and zero nanoseconds -- of delay. The difference between key press and key release does not affect typing at all. You're not waiting to see what happens after you press T before you go on to pressing I (or whatever letter you're following it with).
Worth considering the time (and effort) saved from moving the hands to the modifier keys. It's nice being able to have the hands remain on the home row.
EDIT: rather, there's hardly any speed lost (if any); but there's a big amount of comfort gained from using home row mods.
> Also, when using Emacs I often press and release the ctrl key without completing a control sequence
The behaviour is customisable, but e.g. if you're holding the tap-hold key for longer than a 'tap', then it'd still register as a 'hold' rather than sending a 'tap'.
It may also be unclear what you intend if while holding 'j', you start pressing another key. The behaviour is customisable. https://docs.qmk.fm/#/tap_hold?id=tap-or-hold-decision-modes
> I hope you're not playing a game which uses j, because your inputs now have jitter.
Well, if you've got tap-hold on the keys "ASD", then games with WASD movement will be hard to play. :) -- I have a gaming layer without the tap-hold keys, separate from the normal typing layer.
https://github.com/manna-harbour/miryoku
Before QMK, I used Kmonad and Keyd for getting these advanced features on any keyboard.
https://github.com/kmonad/kmonad
https://github.com/rvaiya/keyd
It became so natural that normal keyboards became hard to use.
I am going to try this with my kinesys at work. The ergodox I have is for home.
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.
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.
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".
(1) https://www.autohotkey.com/
And, on Linux, this is combining `xdotool` with the native "shortcut" functionality in your desktop environment. ;)
[1] https://gitlab.com/interception/linux/plugins/caps2esc
[2] https://gitlab.com/interception/linux/tools
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...
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.
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!
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...
CPU-based could be easier.
Also, fuck RMLVO, let live KcCGST.
Left Alt -> Ctrl
Meta ->Alt
Cpas Lock ->Esc
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!
edit: fixed link
This essentially puts both Ctrl and Esc in a comfortable position on the home row, probably my favorite "ergo hack" ever.
[1] http://www.hammerspoon.org/
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.
The 'caps lock' and 'control' keys were swapped as compared to todays keyboards!
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.