<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cyberborean Chronicles &#187; keyboard</title>
	<atom:link href="http://blog.cyberborean.org/tag/keyboard/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.cyberborean.org</link>
	<description>by Alex Alishevskikh</description>
	<lastBuildDate>Wed, 18 Jan 2012 07:52:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Compose key magic</title>
		<link>http://blog.cyberborean.org/2008/01/06/compose-key-magic</link>
		<comments>http://blog.cyberborean.org/2008/01/06/compose-key-magic#comments</comments>
		<pubDate>Sun, 06 Jan 2008 13:25:58 +0000</pubDate>
		<dc:creator>Alex Alishevskikh</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[unicode]]></category>

		<guid isPermaLink="false">http://cyberborean.wordpress.com/2008/01/06/compose-key-magic/</guid>
		<description><![CDATA[There are some amusing things in Linux which are hard to discover because they are invisible. Entering Unicode characters and sequences with a Compose key is one of those hidden features which can make user&#8217;s life much easier. How it works It&#8217;s simple and easy. You press and release a special key called &#8220;Compose&#8221; (or, [...]]]></description>
			<content:encoded><![CDATA[<p>There are some amusing things in Linux which are hard to discover because they are invisible. Entering Unicode characters and sequences with a Compose key is one of those hidden features which can make user&#8217;s life much easier.</p>
<p><span id="more-197"></span></p>
<h3>How it works</h3>
<p>It&#8217;s simple and easy. You press and release a special key called &#8220;<a href="http://en.wikipedia.org/wiki/Compose_key">Compose</a>&#8221; (or, &#8220;Multi_key&#8221;) and then, two or three character keys &#8211; a mnemonic ASCII sequence identifies a Unicode character you want to see. For example, the sequence of letter keys &#8220;o&#8221; and &#8220;c&#8221; produces the copyright symbol (©) and it is much easier to remember than Unicode <a href="http://www.fileformat.info/info/unicode/char/00a9/index.htm">00A9</a>.</p>
<h3>Where is my Compose key?</h3>
<p>There is no Compose key defined in X.org by default. Before using it, you need to do some configuration to tell X which key you want to use as a Compose. Usually,  right &#8220;Win&#8221; (&#8220;Super&#8221;) key is a good choice.</p>
<p><img src="http://cyberborean.wordpress.com/files/2008/01/kdecompose.png" alt="kdecompose.png" align="right" />In KDE, open &#8220;Keyboard layout&#8221; configuration panel (Control Center → Regional &amp; Accessibility → Keyboard Layout) and select &#8220;Enable xkb options&#8221; checkbox on &#8220;Xkb options&#8221; tab. Then scroll the options list down to &#8220;Compose key position&#8221; section and select a checkbox for a key you want to use as a Compose.</p>
<p>Alternatively, you can edit <code>/etc/X11/Xorg.conf</code> (as a root) to add the line to the keyboard section:</p>
<pre>Option "XkbOptions"  "compose:rwin"</pre>
<p>After configuration is done, restart X (simply hit Ctrl+Alt+Backspace).</p>
<p>Note that you&#8217;ll need Unicode fonts installed (to see all exotic characters) and a default locale with UTF-8 support (e.g. en_US.UTF-8 for US English).  This seems to be the default in modern Linux distributions.</p>
<h3>Predefined characters</h3>
<h4>Diacritics, ligatures and currency symbols</h4>
<p>Entering extended latin letters with diacritic marks follows the pattern:</p>
<pre><strong>Compose <em>diacritic_character letter</em></strong></pre>
<p>The diacritic characters are:</p>
<ul>
<li><strong></strong><code>'</code> (apostrophe) ⇒ A letter with acute (Áá)</li>
<li><strong></strong><code>"</code> (double quote) ⇒ A letter with diaeresis (Ää)</li>
<li><strong><code>`</code></strong> (grave) ⇒ A letter with grave (Àà)</li>
<li><strong></strong><code>_</code> (underscore) ⇒ A letter with macron (Āā)</li>
<li><strong><code>^</code></strong> (circumflex) ⇒ A letter with circumflex (Ââ)</li>
<li><strong></strong><code>~</code> (tilde) ⇒ A letter with tilde (Ãã)</li>
<li><strong></strong><code>,</code> (comma) ⇒ A letter with cedilla (Çç)</li>
<li><strong></strong><code>.</code> (period) ⇒ A letter with dot above (Ȧȧ)</li>
<li><strong><code>!</code></strong> (exclamation) ⇒ A letter with  dot below (Ạạ)</li>
<li><strong><code>?</code></strong> (question) ⇒ A letter with hook (Ảả)</li>
<li><strong><code>/</code></strong> (slash), <code>-</code><strong></strong> (minus) ⇒ A letter with stroke (Øø, Đđ)</li>
<li><strong><code>;</code></strong> (semicolon) ⇒ A letter with ogonek (Ąą)</li>
<li><strong></strong><code>+</code> (plus) ⇒ A letter with horn (Ơơ)</li>
<li><strong></strong><code>=</code> (equals) ⇒ A letter with double acute (Őő)</li>
<li><strong><code>o</code></strong> ⇒ A letter with ring (Åå)</li>
<li><strong><code>c</code></strong> ⇒ A letter with caron (Ǎǎ)</li>
<li><strong><code>b</code></strong> ⇒ A letter with breve (Ăă)</li>
</ul>
<p>Some characters may be combined to create mixed diacritical marks, e.g. <code>Compose _ " a</code> produces ǟ (&#8216;a&#8217; with diaeresis and macron), and so on.</p>
<p>Other letters and ligatures:</p>
<ul>
<li><code>Compose A/a E/e</code> ⇒ Æ/æ</li>
<li><code>Compose O/o E/e</code> ⇒ Œ/œ</li>
<li><code>Compose T/t H/h</code> ⇒ Þ/þ</li>
<li><code>Compose N/n G/g</code> ⇒ Ŋ/ŋ</li>
<li><code>Compose s s</code> ⇒ ß</li>
<li><code>Compose e e</code> ⇒ ə</li>
</ul>
<p>Currency symbols:</p>
<ul>
<li><code>Compose c /</code> ⇒ ¢</li>
<li><code>Compose C =</code> ⇒ €</li>
<li><code>Compose L =</code> ⇒ ₤</li>
<li><code>Compose F r</code> ⇒ ₣</li>
<li><code>Compose Y =</code> ⇒ ¥</li>
<li><code>Compose o x</code> ⇒ ¤</li>
</ul>
<h4>Punctuation marks and other symbols</h4>
<p>Quotation marks:</p>
<ul>
<li><code>Compose , '</code> ⇒ ‚</li>
<li><code>Compose , "</code> ⇒ „</li>
<li><code>Compose &lt; '</code> ⇒ ‘</li>
<li><code>Compose &gt; '</code> ⇒ ’</li>
<li><code>Compose &lt; "</code> ⇒ “</li>
<li><code>Compose &gt; "</code> ⇒ ”</li>
<li><code>Compose &lt; &lt;</code> ⇒ «</li>
<li><code>Compose &gt; &gt;</code> ⇒ »</li>
<li><code>Compose . &lt;</code> ⇒ ‹</li>
<li><code>Compose . &gt;</code> ⇒ ›</li>
</ul>
<p>Others:</p>
<ul>
<li><code>Compose . .</code> ⇒ ·</li>
<li><code>Compose - - -</code> ⇒ — (em-dash)</li>
<li><code>Compose - - .</code> ⇒ – (en-dash)</li>
<li><code>Compose ? ?</code> ⇒ ¿</li>
<li><code>Compose ! !</code> ⇒ ¡</li>
<li><code>Compose + -</code> ⇒ ±</li>
<li><code>Compose : -</code> ⇒ ÷</li>
<li><code>Compose 1 2</code> ⇒ ½</li>
<li><code>Compose 1 4</code> ⇒ ¼</li>
<li><code>Compose 3 4</code> ⇒ ¾</li>
<li><code>Compose _ 0-9</code> ⇒ ₀ &#8211; ₉ (subscript digit)</li>
<li><code>Compose ^ 0-9</code> ⇒ ⁰ &#8211; ⁹ (superscript digit)</li>
<li><code>Compose ( 0-9 )</code> ⇒ ⓪ &#8211; ⑨ (circled digit)</li>
<li><code>Compose o c</code> ⇒ ©</li>
<li><code>Compose o r</code> ⇒ ®</li>
<li><code>Compose o o</code> ⇒ °</li>
<li><code>Compose o s</code> ⇒ §</li>
<li><code>Compose x x</code> ⇒ ×</li>
<li><code>Compose P P</code> ⇒ ¶</li>
<li><code>Compose T M</code> ⇒ ™</li>
<li><code>Compose m u</code> ⇒ µ</li>
<li><code>Compose % o</code> ⇒ ‰</li>
</ul>
<h3>Defining custom Compose sequences</h3>
<p>Default Compose sequences are defined in &#8216;<code>Compose</code>&#8216; text file in the current locale directory (<code>/usr/share/X11/locale/xxx</code>). This file contains the rules to define Compose keyboard sequences and corresponding Unicode characters:</p>
<pre># UTF-8 (Unicode) compose sequence
# David.Monniaux (at) ens.fr
#
# $XFree86: xc/nls/Compose/en_US.UTF-8,v 1.11 2004/01/06 13:14:04 pascal Exp $
...
&lt;Multi_key&gt; &lt;less&gt; &lt;less&gt;        	: "«"   guillemotleft # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
&lt;Multi_key&gt; &lt;greater&gt; &lt;greater&gt;  	: "»"   guillemotright # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
&lt;Multi_key&gt; &lt;less&gt; &lt;apostrophe&gt;  	: "‘"   U2018 # LEFT SINGLE QUOTATION MARK
...</pre>
<p>To define new Compose sequence, we should add another rule using the syntax:</p>
<pre>&lt;Multi_key&gt; &lt;<em>key1</em>&gt; [&lt;<em>key2</em>&gt; ...]   	: "<em>character</em>"</pre>
<p>For instance, for a smiley character (☺, Unicode <a href="http://www.fileformat.info/info/unicode/char/263a/index.htm">263A</a>), the rule could be</p>
<pre>&lt;Multi_key&gt; &lt;colon&gt; &lt;parenright&gt; : "☺"  # Compose : )</pre>
<p>There is a number of utilities (like KCharSelect in KDE) for to select the Unicode characters and insert them into the file via clipboard.</p>
<p>It is possible to add new rules just into this system file (if you are root), but it&#8217;s better to create &#8216;<code>.XCompose</code>&#8216; file in the user home directory:</p>
<pre># ~/.XCompose
# This file defines custom Compose sequence for Unicode characters 

# Import default rules from the system Compose file:
include "/usr/share/X11/locale/en_US.UTF-8/Compose"

&lt;Multi_key&gt; &lt;colon&gt; &lt;parenright&gt; : "☺" U263A   # Compose : )
&lt;Multi_key&gt; &lt;minus&gt; &lt;less&gt;   : "←"  U2190 # Compose - &lt;
&lt;Multi_key&gt; &lt;minus&gt; &lt;greater&gt; : "→" U2192 # Compose -&gt;
...</pre>
<p>You also can assign whole strings to the Compose sequences — for instance, syntax constructions of your favorite programming language or HTML tags:</p>
<pre>&lt;Multi_key&gt; &lt;less&gt; &lt;p&gt; : "&lt;p&gt;&lt;/p&gt;" # Compose &lt; p
&lt;Multi_key&gt; &lt;less&gt; &lt;a&gt; : "&lt;a href=""&gt;&lt;/a&gt;" # Compose &lt; a
...</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyberborean.org/2008/01/06/compose-key-magic/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

