{"id":791,"date":"2011-03-20T23:40:49","date_gmt":"2011-03-21T06:40:49","guid":{"rendered":"http:\/\/www.elbeno.com\/blog\/?p=791"},"modified":"2011-03-20T23:40:49","modified_gmt":"2011-03-21T06:40:49","slug":"keyboard-fun","status":"publish","type":"post","link":"https:\/\/www.elbeno.com\/blog\/?p=791","title":{"rendered":"Keyboard fun"},"content":{"rendered":"<p>One can have hours of fun with xmodmap. Especially if one has a <a href=\"https:\/\/www.elbeno.com\/blog\/?p=725\">Symbolics keyboard<\/a>.<\/p>\n<p>For a start, I get a &#8220;real&#8221; Meta key (not Alt) and a couple of extra modifier keys that emacs knows about: Hyper and Super. I mapped these to mod2 and mod3. Staying away from mod4 is a good idea because that defaults to the Windows key (on modern keyboards) and there are some Gnome shortcuts that would clash, e.g. show desktop (Windows-d). Modifier 5 is known by xmodmap as Mode_switch, normally mapped to &#8220;Alt Gr&#8221;.<\/p>\n<p>I learned that a keypress can do 4 things according to the mode it&#8217;s in:<\/p>\n<ul>\n<li>normal press &#8211; type the glyph<\/li>\n<li>shift + press &#8211; type the shifted glyph<\/li>\n<li>mode_switch + press<\/li>\n<li>shift + mode_switch + press<\/li>\n<\/ul>\n<p>The last two of these are outside of normal use, which basically means that you are free to map them to whatever. On the Symbolics keyboard I mapped mode_switch to the Symbol key. Then I had fun making the modmap to make the keys do various things like type Greek letters and mathematical symbols.<\/p>\n<p>I think there&#8217;s a reasonably natural mapping between Greek and English letters thus:<\/p>\n<ul>\n<li>A &#8211; alpha (&alpha;)<\/li>\n<li>B &#8211; beta (&beta;)<\/li>\n<li>C &#8211; chi (&chi;)<\/li>\n<li>D &#8211; delta (&delta;)<\/li>\n<li>E &#8211; epsilon (&epsilon;)<\/li>\n<li>F &#8211; phi (&phi;)<\/li>\n<li>G &#8211; gamma (&gamma;)<\/li>\n<li>H &#8211; theta (&theta;)<\/li>\n<li>I &#8211; iota (&iota;)<\/li>\n<li>K &#8211; kappa (&kappa;)<\/li>\n<li>L &#8211; lambda (&lambda;)<\/li>\n<li>M &#8211; mu (&mu;)<\/li>\n<li>N &#8211; eta (&eta;)<\/li>\n<li>O &#8211; omicron (&omicron;)<\/li>\n<li>P &#8211; pi (&pi;)<\/li>\n<li>R &#8211; rho (&rho;)<\/li>\n<li>S &#8211; sigma (&sigma;)<\/li>\n<li>T &#8211; tau (&tau;)<\/li>\n<li>U &#8211; upsilon (&upsilon;)<\/li>\n<li>V &#8211; nu (&nu;)<\/li>\n<li>W &#8211; omega (&omega;)<\/li>\n<li>X &#8211; xi (&xi;)<\/li>\n<li>Y &#8211; psi (&psi;)<\/li>\n<li>Z &#8211; zeta (&zeta;)<\/li>\n<\/ul>\n<p>That leaves Q and J free with no obvious Greek letter equivalents. For the number keys, I added some mathematical symbols, and for the punctuation keys I added further punctuation (e.g. left and right guillemots) and things like copyright and trademark symbols.<\/p>\n<p>But that&#8217;s not all&#8230; I have plans to alter the keyboard firmware (it&#8217;s just programmed using C and Teensy &#8211; I&#8217;ve already made some mods) to use the &#8220;Mode Lock&#8221; key more extensively. So Mode Lock basically is a hardware shift key, and when it&#8217;s on, I can make the entire keyboard send different key codes. Since there are a total of 255 possible keycodes recognisable by xmodmap, I should have room to fit in another complete set (again, 4 per key) and be able to type all sorts of weird and wonderful glyphs.<\/p>\n<p>The only issue I have at the moment is around the keycodes that are in the &#8220;numpad zone&#8221; on a regular keyboard. The mode_switch doesn&#8217;t seem to work with them yet. I still have to figure that out.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One can have hours of fun with xmodmap. Especially if one has a Symbolics keyboard. For a start, I get a &#8220;real&#8221; Meta key (not Alt) and a couple of extra modifier keys that emacs knows about: Hyper and Super. I mapped these to mod2 and mod3. Staying away from&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,19],"tags":[],"class_list":["post-791","post","type-post","status-publish","format-standard","hentry","category-lisp","category-tinkering"],"_links":{"self":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=791"}],"version-history":[{"count":1,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/791\/revisions"}],"predecessor-version":[{"id":792,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/791\/revisions\/792"}],"wp:attachment":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}