alt.hn

2/19/2026 at 11:15:38 AM

ShannonMax: A Library to Optimize Emacs Keybindings with Information Theory

https://github.com/sstraust/shannonmax

by sammy0910

2/19/2026 at 1:59:20 PM

Something I love about emacs is the ability to tab complete the name of a command. I do know a lot of keyboard shortcuts, but I use way, way more commands than I know the shortcut for. Need to rename a buffer? M-x ren-buf TAB should do it. Etc.

by Jeff_Brown

2/19/2026 at 2:47:51 PM

Me to, but to be fair, I think this is no longer unique to Emacs. See for example the "command palette" in VSCode; it isn’t "tab completion" per se but similar to e.g. M-x with Vertico.

by setopt

2/19/2026 at 6:31:11 PM

Probably he's referring to "fuzzy find"?

Yes, VSCode has something similar, I believe. But Emacs had it before VSCode existed ;-)

by BeetleB

2/19/2026 at 5:53:52 PM

I was thinking I was crazy...I use command completion in lots of different applications...

by goodmythical

2/19/2026 at 7:35:23 PM

This is cool.

While we're discussing optimizing emacs keybindings...I've found it key to have my bindings set up such that my thumbs operate the control modifier key.

by snikeris

2/19/2026 at 8:21:17 PM

I'm fine with the standard CAPS_LOCK is CTRL setup...

by kleiba

2/19/2026 at 9:48:19 PM

I got a pretty bad case of RSI with that setup, since it encourages one-handed chording (e.g. pressing C-x C-s by holding down your pinkie on Caps Lock while twisting your wrist to tap X then S using other fingers on the same hand). It’s far more ergonomic to do two-handed chording, where you press one key at a time with each hand to the extent possible. For me, that meant using Karabiner Element (Mac) and Keyd (Linux) to map Return to another Ctrl key when held down (in addition to the Caps as Ctrl mapping). Then I can simply hold down Return with my right hand and tap X then S with whatever fingers feel natural on the left hand, without twisting my wrist at all.

by setopt

2/19/2026 at 10:24:00 PM

Indeed. I had RSI issues very early in my career, and the standard advice by ergonomists was "Use both hands when doing any multi-key sequence". If you're doing Ctrl-C, use the right Ctrl button, and so on.

by BeetleB

2/19/2026 at 9:23:44 PM

I could never get used to that. I should probably try forcing the issue to see if I can rewire my muscle memory, but I'm afraid that it'll be a problem in places where I don't want caps lock rebound to ctrl.

by Pay08

2/19/2026 at 1:27:22 PM

This looks great. Would there be an easy way to generalize this program to tiling window managers? Maybe initially I can use this by modifying the WM to forward all its keybindings to a dummy Emacs instance. For WMs is the entropy theory also applicable?

by lorenzohess

2/19/2026 at 2:09:19 PM

it should be -- as long as you have like the right logging set up, I think the theory would also be applicable.

currently the calculations in this library are done with a clojure jar, so if you're interested, you might have an easier time calling that directly

by sammy0910

2/19/2026 at 5:05:39 PM

Are there any similar tools for the OS as a whole?

I'm trying to switch to Corne keyboards and the key maps are critical.

by tra3

2/19/2026 at 9:24:58 PM

This is theoretically pretty extensible, but you need an OS-wide keylogger. On the Linux side, I'm not sure if Wayland allows for that at all.

by Pay08

2/19/2026 at 9:19:45 PM

What do you mean, "the OS as a whole"? This is the OS!

by chills

2/19/2026 at 5:48:48 PM

this is great / will try!

by aghilmort