{"id":8465,"date":"2013-05-11T08:38:14","date_gmt":"2013-05-11T12:38:14","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=8465"},"modified":"2025-02-21T16:47:02","modified_gmt":"2025-02-21T21:47:02","slug":"compose-yourself-raspberry-pi","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2013\/05\/11\/compose-yourself-raspberry-pi\/","title":{"rendered":"Compose yourself, Raspberry Pi!"},"content":{"rendered":"\n<p>Years ago, I worked in multilingual dictionary publishing. I was on the computing team, so we had to support the entry and storage of text in many different languages. Computers could display accented and special characters, but we were stuck with 8-bit character sets. This meant that we could only have a little over 200 distinct characters display in the same font at the same time. We&#8217;d be pretty much okay doing French &amp; English together, but French &amp; Norwegian started to get a little trying, and Italian &amp; Greek couldn&#8217;t really be together at all.<\/p>\n\n\n\n<p>We were very fortunate to be using <a href=\"https:\/\/en.wikipedia.org\/wiki\/SPARCstation_IPC\">Sun<\/a> workstations in the editorial office. These were quite powerful Unix machines, which means that they were a fraction of the speed and capabilities of a Raspberry Pi. Suns had one particularly neat feature:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/File:Compose_key_on_Sun_Type_5c_keyboard.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"201\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/Compose_key_on_Sun_Type_5c_keyboard.jpg\" alt=\"Compose_key_on_Sun_Type_5c_keyboard\" class=\"wp-image-8466\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/Compose_key_on_Sun_Type_5c_keyboard.jpg 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/Compose_key_on_Sun_Type_5c_keyboard-160x100.jpg 160w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-text-align-center\">(<em>source: <a href=\"https:\/\/en.wikipedia.org\/wiki\/Compose_key\">Compose key<\/a>, Wikipedia.<\/em>)<\/p>\n\n\n\n<p>That little key marked \u201cCompose\u201d (to the right of the space bar) acted as a semi-smart typewriter backspace key: if you hit Compose, then the right key combination, an accented character or symbol would appear. Some of the straightforward compose key sequences are:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><b>&nbsp;<\/b><\/td><td><strong>Compose +<\/strong><\/td><td><b>&nbsp;<\/b><\/td><td><b>&nbsp;<\/b><\/td><\/tr><tr><td><strong>Accent<\/strong><\/td><td><strong>First key<\/strong><\/td><td><strong>Second key<\/strong><\/td><td><strong>Result<\/strong><\/td><td><strong>Example<\/strong><\/td><\/tr><tr><td>Acute<\/td><td>\u2018<\/td><td>e<\/td><td>\u00e9<\/td><td><i>caf<strong>\u00e9<\/strong><\/i><\/td><\/tr><tr><td>Grave<\/td><td>`<\/td><td>a<\/td><td>\u00e0<\/td><td><i>d\u00e9j<strong>\u00e0<\/strong><\/i><\/td><\/tr><tr><td>Cedilla<\/td><td>,<\/td><td>c<\/td><td>\u00e7<\/td><td><i>soup<strong>\u00e7<\/strong>on<\/i><\/td><\/tr><tr><td>Circumflex<\/td><td>^<\/td><td>o<\/td><td>\u00f4<\/td><td><i>h<strong>\u00f4<\/strong>tel<\/i><\/td><\/tr><tr><td>Umlaut<\/td><td>\u201c<\/td><td>u<\/td><td>\u00fc<\/td><td><i>k<strong>\u00fc<\/strong>che<\/i><\/td><\/tr><tr><td>Ring<\/td><td>o<\/td><td>a<\/td><td>\u00e5<\/td><td><i>H<strong>\u00e5<\/strong>kon<\/i><\/td><\/tr><tr><td>Slash<\/td><td>\/<\/td><td>L<\/td><td>\u0141<\/td><td><a href=\"https:\/\/en.wikipedia.org\/wiki\/Jan_%C5%81ukasiewicz\"><i><strong>\u0141<\/strong>ukasiewicz<\/i><\/a><\/td><\/tr><tr><td>Tilde<\/td><td>~<\/td><td>n<\/td><td>\u00f1<\/td><td><i>ma<strong>\u00f1<\/strong>ana<\/i><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Like every (non-embedded) Linux system I&#8217;ve used, the Raspberry Pi running Raspbian can use the compose key method for entering extra characters. I&#8217;m annoyed, though, that almost every setup tutorial either says to disable it, or doesn&#8217;t explain what it&#8217;s for. Let me fix that for you &#8230;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setup<\/h2>\n\n\n\n<p>Run raspi-config<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo raspi-config<\/pre>\n\n\n\n<p>and go to the&nbsp;<del><strong>configure_keyboard<\/strong><\/del>&nbsp;\u201c4 Internationalisation Options\u201d \u2192 \u201cI3 Change Keyboard Layout\u201d section. Your keyboard\u2019s probably mostly set up the way you want it, so hit the Tab key and select&nbsp;<strong>&lt;Ok&gt;<\/strong>&nbsp;until you get to the Compose key section:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/Screenshot-from-2013-04-21-162127.png\"><img loading=\"lazy\" decoding=\"async\" width=\"724\" height=\"463\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/Screenshot-from-2013-04-21-162127.png\" alt=\"raspi-config: Compose key selection\" class=\"wp-image-8469\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/Screenshot-from-2013-04-21-162127.png 724w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/Screenshot-from-2013-04-21-162127-160x102.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/Screenshot-from-2013-04-21-162127-320x204.png 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/Screenshot-from-2013-04-21-162127-469x300.png 469w\" sizes=\"auto, (max-width: 724px) 100vw, 724px\" \/><\/a><\/figure>\n\n\n\n<p>Choose whatever is convenient. The combined keyboard and trackpad I use (a <a title=\"SolidTek 88 keys Slim-Mii portable keyboard\" href=\"http:\/\/www.solidtekusa.com\/mini.htm#KB3910\">SolidTek KB-3910<\/a>) with my Raspberry Pi has a couple of \u201cWindows\u00ae Logo\u201d\u009d keys, and the one on the right works for me. Keep the rest of the keyboard options the same, and exit raspi-config. After the message<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Reloading keymap. This may take a short while\n[ <span style=\"color: #008000;\">ok<\/span> ] Setting preliminary keymap...done.<\/pre>\n\n\n\n<p>appears, you now have a working Compose key.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using the Compose key<\/h2>\n\n\n\n<p>raspi-config hints&nbsp;(\u2018<em>On the text console the Compose key does not work in Unicode mode \u2026<\/em>\u2019) that Compose might not work everywhere with every piece of software. I&#8217;ve tested it across quite a few pieces of software \u2014 both on the text console and under LXDE \u2014 and support seems to be <em>almost<\/em> universal. The only differences I can find are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Text Console<\/strong>\u00a0\u2014 (<em>a. k. a.<\/em>\u00a0the texty bit you see after booting) Despite raspi-config\u2019s warning, accented alphabetical characters do seem to work (<em>\u00e9 \u00e8 \u00f1 \u00f6 \u00f8 \u00e5<\/em>, etc). Most symbols, however, don\u2019t (like\u00a0<em>\u00b1 \u00d7 \u00f7 \u2026<\/em>). The currency symbol for your country is a special case. In Canada, I need to use Compose for\u00a0<em>\u20ac<\/em>\u00a0and\u00a0<em>\u00a3<\/em>, but you\u2019ve probably got a key for that.<\/li>\n\n\n\n<li><strong>LXDE<\/strong>\u00a0\u2014 (<em>a. k. a.<\/em>\u00a0the mousey bit you see after typing \u2018startx\u2019) All characters and symbols I\u2019ve tried work everywhere, in LXTerminal, Leafpad, Midori, Dillo (browser), IDLE, and\u00a0<a href=\"https:\/\/web.archive.org\/web\/20210224173953\/http:\/\/gottcode.org\/focuswriter\/\">FocusWriter<\/a>\u00a0(a very minimal word processor).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full wp-image-8467\"><img loading=\"lazy\" decoding=\"async\" width=\"221\" height=\"56\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/compose-idle.png\" alt=\"Special characters in Python's IDLE\" class=\"wp-image-8467\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/compose-idle.png 221w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/compose-idle-160x40.png 160w\" sizes=\"auto, (max-width: 221px) 100vw, 221px\" \/><figcaption class=\"wp-element-caption\">Special characters in Python&#8217;s IDLE<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full wp-image-8468\"><img loading=\"lazy\" decoding=\"async\" width=\"598\" height=\"424\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/compose-leafpad.png\" alt=\"Some Compose key sequences \u00e2\u20ac\u201d Leafpad\" class=\"wp-image-8468\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/compose-leafpad.png 598w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/compose-leafpad-160x113.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/compose-leafpad-320x226.png 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2013\/05\/compose-leafpad-423x300.png 423w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><figcaption class=\"wp-element-caption\">Some Compose key sequences \u2014 Leafpad<\/figcaption><\/figure>\n\n\n\n<p>To find out which key sequences do what, the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Compose_key\">Compose key &#8211; Wikipedia<\/a> page is a decent start. I prefer the slightly friendlier Ubuntu references <a href=\"https:\/\/help.ubuntu.com\/community\/GtkComposeTable\">GtkComposeTable<\/a> and <a href=\"https:\/\/help.ubuntu.com\/community\/ComposeKey#Compose_key_sequences\">Compose Key<\/a>, or the almost unreadable but frighteningly comprehensive <a href=\"http:\/\/cgit.freedesktop.org\/xorg\/lib\/libX11\/plain\/nls\/en_US.UTF-8\/Compose.pre\">UTF-8 (Unicode) compose sequence<\/a> reference (which is essentially mirrored on your Raspberry Pi as the file <span style=\"font-family: andale mono,times;\">\/usr\/share\/X11\/locale\/en_US.UTF-8\/Compose<\/span>). Now go forth and work that Compose key like a bo\u00df.<\/p>\n\n\n\n<p>(If you&#8217;re on a Mac and feeling a bit left out, you can do something similar with the <em>Option<\/em> key. Here&#8217;s how: <a href=\"http:\/\/symbolcodes.tlt.psu.edu\/accents\/codemacext.html\">Extended Keyboard Accent Codes for the Macintosh<\/a>. On Windows\u00ae? <del>Out of luck, I&#8217;m afraid<\/del> <a href=\"https:\/\/github.com\/samhocevar\/wincompose\">WinCompose<\/a>!)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Years ago, I worked in multilingual dictionary publishing. I was on the computing team, so we had to support the entry and storage of text in many different languages. Computers could display accented and special characters, but we were stuck with 8-bit character sets. This meant that we could only have a little over 200 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[1990,270,2662,2510,884,638],"class_list":["post-8465","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-compose","tag-linux","tag-multilingual","tag-raspberrypi","tag-symbol","tag-unicode"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-2cx","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/8465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=8465"}],"version-history":[{"count":23,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/8465\/revisions"}],"predecessor-version":[{"id":17781,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/8465\/revisions\/17781"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=8465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=8465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=8465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}