{"id":10918,"date":"2022-10-31T12:43:47","date_gmt":"2022-10-31T16:43:47","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=10918"},"modified":"2022-10-31T12:43:47","modified_gmt":"2022-10-31T16:43:47","slug":"emacs-modifier-keys-in-x-windows","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=10918","title":{"rendered":"Emacs Modifier Keys in X-Windows"},"content":{"rendered":"<p>Most Irreal readers know that Emacs offers the <kbd>Hyper<\/kbd> and <kbd>Super<\/kbd> modifier keys for use in keybindings. Less well known is that there is also an <kbd>Alt<\/kbd> key. It\u2019s not the <kbd>Alt<\/kbd> key that appears on most modern keyboards that Emacs usually maps to <kbd>Meta<\/kbd> but a separate modifier. Sadly, we no longer have the <a href=\"https:\/\/emacsnotes.wordpress.com\/2022\/10\/30\/use-xkb-to-setup-full-spectrum-of-modifiers-meta-alt-super-and-hyper-for-use-with-emacs\/\">Space-cadet keyboard<\/a> so special effort is required to map them to existing keys. Usually, this means giving special meanings to the right modifier keys and perhaps the Window key if you have one.<\/p>\n<p>This isn\u2019t too hard on macOS but can be tricky under X. Over at <a href=\"https:\/\/emacsnotes.wordpress.com\">Emacs Notes<\/a> there\u2019s a very nice post that shows you <a href=\"https:\/\/emacsnotes.wordpress.com\/2022\/10\/30\/use-xkb-to-setup-full-spectrum-of-modifiers-meta-alt-super-and-hyper-for-use-with-emacs\/\">how to use the xkb file to set up all these keys.<\/a> It\u2019s very fussy but only needs to be done once. After that, you can enjoy the full set of Emacs modifier keys.<\/p>\n<p>In the Emacs Next Step branch there are variables to set up the modifiers so you can simply add them to your <code>init.el<\/code>, possibly conditionally evaluated, to make your configuration portable to other OS environments.<\/p>\n<p>The utility of doing all this may not be clear but I use <kbd>Hyper<\/kbd> as a modifier for many operations\u2014either existing or homegrown\u2014that aren\u2019t already mapped. Once you have these keys, you\u2019ll find all sorts of uses for them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most Irreal readers know that Emacs offers the Hyper and Super modifier keys for use in keybindings. Less well known is that there is also an Alt key. It\u2019s not the Alt key that appears on most modern keyboards that &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=10918\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-10918","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\/10918","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=10918"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10918\/revisions"}],"predecessor-version":[{"id":10919,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10918\/revisions\/10919"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}