{"id":6645,"date":"2017-10-02T11:33:00","date_gmt":"2017-10-02T15:33:00","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=6645"},"modified":"2017-10-02T11:33:55","modified_gmt":"2017-10-02T15:33:55","slug":"adding-hyper-and-super-keys-for-emacs","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=6645","title":{"rendered":"Adding Hyper and Super Keys for Emacs"},"content":{"rendered":"<p> I&rsquo;ve written about this <a href=\"http:\/\/irreal.org\/blog\/?p=1450\">before<\/a> but it was a few years ago so it&rsquo;s worth repeating for new Emacs and\/or Mac users. One problem with Emacs is that it&rsquo;s hard to find enough shortcut keys. Having <kbd>Hyper<\/kbd> and <kbd>Super<\/kbd> keys helps a lot but, of course, modern keyboards don&rsquo;t have them. Fortunately, modern keyboards <i>do<\/i> have keys that are otherwise unused in Emacs and they can be drafted as substitutes for <kbd>Hyper<\/kbd> and <kbd>Super<\/kbd>. <\/p>\n<p> Xah Lee has has a page that shows how to <a href=\"http:\/\/ergoemacs.org\/emacs\/emacs_hyper_super_keys.html\">set Hyper and Super keys<\/a> for Linux, Windows, and macOS. For the Mac, he recommends setting the <kbd>\u2318 Cmd<\/kbd> key as <kbd>Meta<\/kbd> and the <kbd>\u2325 Opt<\/kbd> key as <kbd>Super<\/kbd>. That&rsquo;s common advice but I&rsquo;ve never understood it. Emacs already considers the <kbd>\u2318 Cmd<\/kbd> key to be <kbd>Super<\/kbd> and, at least on my Mac keyboards the <kbd>\u2325 Opt<\/kbd> key has a sublabel of <kbd>Alt<\/kbd> so it makes sense to me to use the <kbd>\u2325 Opt<\/kbd> key as <kbd>Meta<\/kbd> and the <kbd>\u2318 Cmd<\/kbd> key as <kbd>Super<\/kbd>. <\/p>\n<p> That leaves the <kbd>Hyper<\/kbd> key which, following Magnar Sveen&rsquo;s advice, I map onto the <kbd>fn<\/kbd> key. It seem like begging for trouble to use <kbd>fn<\/kbd> and <kbd>\u2318 Cmd<\/kbd> 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, <kbd>fn<\/kbd>+<kbd>F8<\/kbd> still pauses\/restarts music even when <kbd>fn<\/kbd> is mapped to <kbd>Hyper<\/kbd>. <\/p>\n<p> It&rsquo;s really useful to have these extra modifier keys to use with 3<sup>rd<\/sup> party packages or even obscure standard Emacs functions. Take a look at Lee&rsquo;s page to see ways of getting them on your platform. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&rsquo;ve written about this before but it was a few years ago so it&rsquo;s worth repeating for new Emacs and\/or Mac users. One problem with Emacs is that it&rsquo;s hard to find enough shortcut keys. Having Hyper and Super keys &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=6645\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-6645","post","type-post","status-publish","format-standard","hentry","category-general","tag-emacs"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6645"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6645\/revisions"}],"predecessor-version":[{"id":6646,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6645\/revisions\/6646"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}