The minds had long ago come up with a proper name for it; they called it the Irreal, but they thought of it as Infinite Fun. That was what they really knew it as. The Land of Infinite Fun. –Iain M. Banks, Excession

Adding Hyper and Super Keys for Emacs

I’ve written about this before but it was a few years ago so it’s worth repeating for new Emacs and/or Mac users. One problem with Emacs is that it’s hard to find enough shortcut keys. Having Hyper and Super keys helps a lot but, of course, modern keyboards don’t have them. Fortunately, modern keyboards do have keys that are otherwise unused in Emacs and they can be drafted as substitutes for Hyper and Super.

Xah Lee has has a page that shows how to set Hyper and Super keys for Linux, Windows, and macOS. For the Mac, he recommends setting the ⌘ Cmd key as Meta and the ⌥ Opt key as Super. That’s common advice but I’ve never understood it. Emacs already considers the ⌘ Cmd key to be Super and, at least on my Mac keyboards the ⌥ Opt key has a sublabel of Alt so it makes sense to me to use the ⌥ Opt key as Meta and the ⌘ Cmd key as Super.

That leaves the Hyper key which, following Magnar Sveen’s advice, I map onto the fn key. It seem like begging for trouble to use fn and ⌘ Cmd this way since they have important OS functions that you might want to access from within Emacs but it turns out that they still perform those functions despite the mapping. For example, fn+F8 still pauses/restarts music even when fn is mapped to Hyper.

It’s really useful to have these extra modifier keys to use with 3rd party packages or even obscure standard Emacs functions. Take a look at Lee’s page to see ways of getting them on your platform.

I also set ⌘ to Super and then bind things like ⌘-V to clipboard-yank so that my regular mac muscle memory still works in emacs. It still leaves plenty of ⌘-keys to bind. I've also made the right ⌘ be Hyper but I haven't used it much yet.

Technically Super is wide open 100% for your custom key space. In practice a lot of packages are bindings things in there because C-x c is hassle. Control and Meta don't provide enough key space. It has nearly run out forcing complicated chords that are "yucky".