{"id":159,"date":"2020-03-03T15:22:00","date_gmt":"2020-03-03T18:22:00","guid":{"rendered":"https:\/\/vargolino.com\/wp\/?p=159"},"modified":"2020-03-03T15:22:00","modified_gmt":"2020-03-03T18:22:00","slug":"change-keyboard-compose-behavior","status":"publish","type":"post","link":"https:\/\/vargolino.com\/wp\/?p=159","title":{"rendered":"Change keyboard Compose behavior"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>For some time I&#8217;ve been wanting to change the default behavior of my keyboard (on an  Ubuntu 18.04 machine) when using the composition keys (dead-keys). <br>\nThe default behavior for the double quote key (<code>\"<\/code>) to be a compose key, in order to be able to input charaters like <code>\u00e4<\/code> (<code>\"+a<\/code>)and <code>\u00f6<\/code> (<code>\"+o<\/code>), so if I wanted a <code>\"<\/code>, I would need to press <code>\"+spacebar<\/code>. I was used to just double tap the <code>\"<\/code> key and get the <code>\"<\/code> (from the Windows days, I think), so I wanted that, but the default is the daeresis sign (<code>\u00a8<\/code>).<\/p>\n\n\n\n<p>Don&#8217;t know if it&#8217;s the setup I have (a default american english keyboard with a PT-BR locale)<br>\nSo my input source is: &#8220;English (US, intl., with dead keys)&#8221;<br>\nAnd formats are defined as: &#8220;Brasil&#8221;<\/p>\n\n\n\n<p>After several searches and a few dead ends (ibus and ibus-tables), I finally ended up with a solution, for my use case anyway. It turns out that the compose sequences were controlled by the files in <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/share\/X11\/locale<\/code><\/pre>\n\n\n\n<p>And the file I needed to change was this one:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/share\/X11\/locale\/pt_BR.UTF-8\/Compose<\/code><\/pre>\n\n\n\n<p>The files are quote self explanatory and they seem to function in a hierarchical way, with the more specialized layouts including the more generic ones and overriding where needed. The pt_BR file included the en_US one, and the values I needed overriding were in the english one. Copying the relevant section and changing the end result was easy and I just added this to the end of the file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;dead_diaeresis> &lt;dead_diaeresis>   : \"\\\"\"   diaeresis # DIAERESIS\n&lt;Multi_key> &lt;quotedbl> &lt;quotedbl>   : \"\\\"\"   diaeresis # DIAERESIS\n&lt;dead_acute> &lt;dead_acute>           : \"'\"   acute # ACUTE ACCENT\n&lt;Multi_key> &lt;apostrophe> &lt;apostrophe>   : \"'\"   acute # ACUTE ACCENT<\/code><\/pre>\n\n\n\n<p>As I could not find an easy way to reload this, restarting the X server solved the rest.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For some time I&#8217;ve been wanting to change the default behavior of my keyboard (on an Ubuntu 18.04 machine) when using the composition keys (dead-keys). The default behavior for the double quote key (&#8220;) to be a compose key, in order to be able to input charaters like \u00e4 (&#8220;+a)and \u00f6 (&#8220;+o), so if I &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/vargolino.com\/wp\/?p=159\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Change keyboard Compose behavior&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[7,9,5],"class_list":["post-159","post","type-post","status-publish","format-standard","hentry","category-solution","tag-howto","tag-linux","tag-x11","entry"],"_links":{"self":[{"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=159"}],"version-history":[{"count":3,"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/159\/revisions"}],"predecessor-version":[{"id":164,"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/159\/revisions\/164"}],"wp:attachment":[{"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}