<?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>Mi blog lah! &#187; fdo</title>
	<atom:link href="http://simos.info/blog/archives/category/fdo/feed" rel="self" type="application/rss+xml" />
	<link>http://simos.info/blog</link>
	<description>Το ιστολόγιό μου</description>
	<lastBuildDate>Wed, 21 Dec 2011 00:16:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Microsoft Windows tax refund, from Dell</title>
		<link>http://simos.info/blog/archives/1000?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=microsoft-windows-tax-refund-from-dell</link>
		<comments>http://simos.info/blog/archives/1000#comments</comments>
		<pubDate>Mon, 29 Jun 2009 19:04:08 +0000</pubDate>
		<dc:creator>Simos Xenitellis</dc:creator>
				<category><![CDATA[activism]]></category>
		<category><![CDATA[fdo]]></category>
		<category><![CDATA[pgo]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[planetellak]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[anticompetitive]]></category>
		<category><![CDATA[credit]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[eula]]></category>
		<category><![CDATA[freedos]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[refund]]></category>
		<category><![CDATA[tax]]></category>
		<category><![CDATA[uk]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://simos.info/blog/?p=1000</guid>
		<description><![CDATA[I just got a credit note from Dell for £31, by rejecting Windows Vista Home Premium SP1 and Microsoft Works 9.0.
Related posts:<ol>
<li><a href='http://simos.info/blog/archives/1021' rel='bookmark' title='Laptop without Windows, an update for Dell, Asus, Acer, Compaq'>Laptop without Windows, an update for Dell, Asus, Acer, Compaq</a></li>
<li><a href='http://simos.info/blog/archives/612' rel='bookmark' title='Connecting to Bluetooth devices between Linux and Windows'>Connecting to Bluetooth devices between Linux and Windows</a></li>
<li><a href='http://simos.info/blog/archives/1198' rel='bookmark' title='Pre-installed Windows and competition in the European Union'>Pre-installed Windows and competition in the European Union</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>So I got a new computer from Dell UK. Unfortunatelly it came with Windows Vista Home Premium (32-bit) SP1 and Microsoft Works 9.0, which I did not intend to use. I contacted Dell Customer Care last Wednesday and they promised to call me back to inform me of their course of action. On Thursday morning I got a call that Dell is in the process to issue the refund and that they will contact me during the coming week when they actually issue the refund. I got the call today Monday at 15:09 that the refund has been issued, £31 for Windows Vista Home Premium SP1 and Microsoft Works 9.0.</p>
<p><img class="alignnone size-full wp-image-1001" title="Dell Credit Note (refund) for Microsoft Windows Vista SP1 and Microsoft Works 9.0" src="http://simos.info/blog/wp-content/uploads/2009/06/Dell-Invoice-Vista_and_Works.png" alt="Dell Credit Note (refund) for Microsoft Windows Vista SP1 and Microsoft Works 9.0" /></p>
<p>In detail, the Credit Note says</p>
<pre>Item No.  Description                    Quantity Unit Price  Net  VAT
          Cust Invd b4 parts recd 3rdpty    -1      26.96   -26.96  S

                                                                 GBP
  VAT Summary                                      Subtotal   -26.96
                                                   Freight      0.00
   VAT    VAT Rate      GBP        GBP             VAT £       -4.04               
   Type     %       Total Net £   VAT £                
    S      15         -26.96      -4.04           
                                                   Total      -31.00</pre>
<p>Now, that was the short story for getting my Windows refund. The long story was that I had to go through several weeks of effort to figure out how to get a new computer without Microsoft software. I contacted by phone both Dell and Microsoft and I estimate I was on the phone for about four hours in total. To save you the effort, here are some tips,</p>
<ol>
<li>You will get stonewalled. I did not get any reliable information on how to buy a computer without Microsoft software while I was researching my options. I actually gave up and proceeded with buying a computer with Windows, considering that my last resort was to use the EULA method as soon as I got it delivered (I would not accept the EULA, thus I would be entitled for a refund or credit).</li>
<li>Apart from phone calls, I spent some time on Dell Chat. In one case, I was told that I can get a computer from the Latitude range with FreeDOS. They would have to get the precise configuration of the computer so that they can give me a quote. We made sure that the configuration was correct (the one in my basket with the one I would get the quote for). It sounded very promising, however, at the end the computer with <a href="http://www.freedos.org/" target="_blank">FreeDOS</a> would be about £30 <strong>more expensive</strong> than Vista. I asked for clarification on this issue but I did not get any.</li>
<li>You will be often told that you are the first person that asks for a computer without Microsoft software. Try to think that you are a pioneer and don't feel let down.</li>
<li>When calling by phone, <a href="http://www.saynoto0870.com/" target="_blank">avoid using premium telephone numbers</a>. Get <a href="http://wiki.ekiga.org/index.php/List_of_PC_to_phone_providers" target="_blank">a good SIP account</a> and configure <a href="http://ekiga.org/" target="_blank">Ekiga</a> or <a href="http://www.sflphone.org/" target="_blank">SFLPhone</a> (has recording feature). For Dell UK, try <span class="para"><a href="http://www1.euro.dell.com/content/topics/topic.aspx/emea/contact/enuk?c=uk&amp;l=en&amp;s=dhs" target="_blank">01344 373727</a> which apparently is fine even if you are not a Public sector customer.</span></li>
</ol>
<p><span class="para"><img class="alignnone size-full wp-image-1003" title="Microsoft Vista first boot screen, EULA or refund/credit." src="http://simos.info/blog/wp-content/uploads/2009/06/MicrosoftVistaEULA.jpg" alt="Microsoft Vista first boot screen, EULA or refund/credit." /></span></p>
<blockquote><p><span class="para">By using the software, you accept these terms. If you do not accept them, do not use the software. Instead, contact the manufacturer or installer to determine their return policy for a refund or credit.. (<em>why are there two dots?</em> -- simos)<br />
</span></p></blockquote>
<p><span class="para">When you first boot a new computer that has Windows pre-installed, you are presented with the above screen. Why would Microsoft give the option to reject their software? I believe the reason is that they want to enter into a contract directly with the customer, thus there is no issue with removing this facility in future versions of Windows (probably for similar reasons, Hotmail now supports POP3, apparently so that small mobile devices can retrieve e-mail. <a href="http://simos.info/blog/archives/876" target="_blank">You can now migrate from Hotmail to GMail easily</a>.). However, the whole environment is setup in such a way that virtually noone would be able to pursue a successful refund. One has to scroll the tiny text box in order to find the pictured paragraph (no option to print!). Even the Microsoft Customer Care EMEA are not aware of the option not to accept the EULA.</span></p>
<p><span class="para">In your case, if you do not intend to use the pre-installed Microsoft software (apparently includes the case where you already have a license, such as an Academic License), you have the option to reject for a refund or credit. Simply press the <strong>Shutdown</strong> button and do not accept the license. Then, get on the phone.<br />
</span></p>
<p><span class="para"><img class="alignnone size-full wp-image-1004" title="Antirrhinum (Snapdragon)" src="http://simos.info/blog/wp-content/uploads/2009/06/Skylaki.jpg" alt="Antirrhinum (Snapdragon)" /></span></p>
<p>I installed Ubuntu 9.04 (x86_64) and the computer runs fine <img src='http://simos.info/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p><span class="para">It was unexpected when <a href="http://news.bbc.co.uk/1/hi/business/8047546.stm" target="_blank">Intel got a heavy fine from the EU for anticompetitive practices</a>. Does this practice by Microsoft (making it extremely difficult to obtain a refund or credit) constitute an anticompetitive practice?<br />
</span></p>
<p>Related posts:<ol>
<li><a href='http://simos.info/blog/archives/1021' rel='bookmark' title='Laptop without Windows, an update for Dell, Asus, Acer, Compaq'>Laptop without Windows, an update for Dell, Asus, Acer, Compaq</a></li>
<li><a href='http://simos.info/blog/archives/612' rel='bookmark' title='Connecting to Bluetooth devices between Linux and Windows'>Connecting to Bluetooth devices between Linux and Windows</a></li>
<li><a href='http://simos.info/blog/archives/1198' rel='bookmark' title='Pre-installed Windows and competition in the European Union'>Pre-installed Windows and competition in the European Union</a></li>
</ol></p><p><small><a href="http://simos.info/blog/archives/1000#comments">23 comments</a></small></p>]]></content:encoded>
			<wfw:commentRss>http://simos.info/blog/archives/1000/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Layout editor keyboard</title>
		<link>http://simos.info/blog/archives/715?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=layout-editor-keyboard</link>
		<comments>http://simos.info/blog/archives/715#comments</comments>
		<pubDate>Thu, 24 Jul 2008 06:42:31 +0000</pubDate>
		<dc:creator>Simos</dc:creator>
				<category><![CDATA[fdo]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[planetellak]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[pygtk]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://simos.info/blog/?p=715</guid>
		<description><![CDATA[This is a screenshot of the keyboard for the layout editor. The keyboard is a widget which is composed of individual widgets of each key. I did not use glade-3 for the keyboard at this time. Although it is possible to create custom widgets in Python and install them in Glade, the current distributed packages [...]
Related posts:<ol>
<li><a href='http://simos.info/blog/archives/695' rel='bookmark' title='Keyboard layout editor UI concept'>Keyboard layout editor UI concept</a></li>
<li><a href='http://simos.info/blog/archives/747' rel='bookmark' title='The Keyboard Layout Editor'>The Keyboard Layout Editor</a></li>
<li><a href='http://simos.info/blog/archives/669' rel='bookmark' title='Keyboard Layout Editor GSOC project'>Keyboard Layout Editor GSOC project</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://simos.info/blog/wp-content/uploads/2008/07/screenshot-keyboardlayouteditor.png"><img class="alignnone size-medium wp-image-716" title="screenshot-keyboardlayouteditor" src="http://simos.info/blog/wp-content/uploads/2008/07/screenshot-keyboardlayouteditor-300x172.png" alt="" width="300" height="172" /></a></p>
<p>This is a screenshot of the keyboard for the layout editor. The keyboard is a widget which is composed of individual widgets of each key.</p>
<p>I did not use glade-3 for the keyboard at this time. Although it is possible to create custom widgets in Python and install them in Glade, the current distributed packages are <a href="http://www.nabble.com/Python-catalog-to-support-python-widgets-at-runtime-td17658517.html" target="_blank">missing something</a>, thus it would be messy when others try to use the editor. It's a good experience to do all by hand anyway.</p>
<p>When creating a layout, you drag and drop characters on the keyboard. The editor shows a table with characters though it would be possible to drag characters from gucharmap as well.</p>
<p>The next step is to get an intuitive UI so that when you drop a character on a key, the key expands (a popup appears) showing the available four positions to receive the character.</p>
<p>Related posts:<ol>
<li><a href='http://simos.info/blog/archives/695' rel='bookmark' title='Keyboard layout editor UI concept'>Keyboard layout editor UI concept</a></li>
<li><a href='http://simos.info/blog/archives/747' rel='bookmark' title='The Keyboard Layout Editor'>The Keyboard Layout Editor</a></li>
<li><a href='http://simos.info/blog/archives/669' rel='bookmark' title='Keyboard Layout Editor GSOC project'>Keyboard Layout Editor GSOC project</a></li>
</ol></p><p><small><a href="http://simos.info/blog/archives/715#comments">2 comments</a></small></p>]]></content:encoded>
			<wfw:commentRss>http://simos.info/blog/archives/715/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Keyboard layout editor UI concept</title>
		<link>http://simos.info/blog/archives/695?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=keyboard-layout-editor-ui-concept</link>
		<comments>http://simos.info/blog/archives/695#comments</comments>
		<pubDate>Thu, 03 Jul 2008 21:16:33 +0000</pubDate>
		<dc:creator>Simos Xenitellis</dc:creator>
				<category><![CDATA[fdo]]></category>
		<category><![CDATA[planetellak]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[cairo]]></category>
		<category><![CDATA[character]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[pygtk]]></category>
		<category><![CDATA[standard]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[unicode]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[wind]]></category>

		<guid isPermaLink="false">http://simos.info/blog/?p=695</guid>
		<description><![CDATA[(click for bigger image) At the top we select the keyboard layout file, the variant, and set the corresponding verbose name. The keyboard layout editor shows a standard keyboard, where each keyboard key can show up to four levels. When you select a key, the bottor-left window shows the characters that have been set (here [...]
Related posts:<ol>
<li><a href='http://simos.info/blog/archives/715' rel='bookmark' title='Layout editor keyboard'>Layout editor keyboard</a></li>
<li><a href='http://simos.info/blog/archives/747' rel='bookmark' title='The Keyboard Layout Editor'>The Keyboard Layout Editor</a></li>
<li><a href='http://simos.info/blog/archives/611' rel='bookmark' title='Firefox shortcuts in Linux on non-us keyboard layout, and Greek'>Firefox shortcuts in Linux on non-us keyboard layout, and Greek</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://simos.info/blog/wp-content/uploads/2008/07/keyboardlayout.png"><img class="alignnone size-medium wp-image-699" title="Keyboard layout editor concept" src="http://simos.info/blog/wp-content/uploads/2008/07/keyboardlayout-300x147.png" alt="" width="300" height="147" /></a></p>
<p>(click for bigger image)</p>
<p>At the top we select the keyboard layout file, the variant, and set the corresponding verbose name.</p>
<p>The keyboard layout editor shows a standard keyboard, where each keyboard key can show up to four levels. When you select a key, the bottor-left window shows the characters that have been set (here we use four levels). In this bottom-left window we can drag and drop characters (from Unicode blocks) and dead keys that are found from the right of the image. Dead keys are shown in red boxes.</p>
<p>The user is also able to include existing keyboard layout files in the current layout.</p>
<p>At this stage I am thinking how to easily draw the keyboard in a PyGTK application. It would be important not to draw it manually. It would be cool to have a GTK+ keyboard key widget, that you can specify the size, and the text that appears on it, then build a keyboard in Glade. Another option would be to have the basic keyboard as an SVG file (already exists), then draw over it with Cairo. I am inclined for the second option.</p>
<p>Related posts:<ol>
<li><a href='http://simos.info/blog/archives/715' rel='bookmark' title='Layout editor keyboard'>Layout editor keyboard</a></li>
<li><a href='http://simos.info/blog/archives/747' rel='bookmark' title='The Keyboard Layout Editor'>The Keyboard Layout Editor</a></li>
<li><a href='http://simos.info/blog/archives/611' rel='bookmark' title='Firefox shortcuts in Linux on non-us keyboard layout, and Greek'>Firefox shortcuts in Linux on non-us keyboard layout, and Greek</a></li>
</ol></p><p><small><a href="http://simos.info/blog/archives/695#comments">One comment</a></small></p>]]></content:encoded>
			<wfw:commentRss>http://simos.info/blog/archives/695/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Converting between XKB and XML</title>
		<link>http://simos.info/blog/archives/689?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=converting-between-xkb-and-xml</link>
		<comments>http://simos.info/blog/archives/689#comments</comments>
		<pubDate>Fri, 20 Jun 2008 23:59:46 +0000</pubDate>
		<dc:creator>Simos Xenitellis</dc:creator>
				<category><![CDATA[fdo]]></category>
		<category><![CDATA[planetellak]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[cc]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[nat]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[xkb]]></category>

		<guid isPermaLink="false">http://simos.info/blog/?p=689</guid>
		<description><![CDATA[I completed the stage that takes keyboard layout files from XKB (X.Org) and converts them to XML documents, based on a keyboard layout Relax NG schema. Then, these XML documents can also be converted back to keyboard layout files. Here is an imaginary example of a keyboard layout file. // Keyboard layout for the Zzurope [...]
Related posts:<ol>
<li><a href='http://simos.info/blog/archives/683' rel='bookmark' title='Parsing XKB files with antlr'>Parsing XKB files with antlr</a></li>
<li><a href='http://simos.info/blog/archives/684' rel='bookmark' title='Looking into the symbol files'>Looking into the symbol files</a></li>
<li><a href='http://simos.info/blog/archives/13' rel='bookmark' title='Keyboard layout for combining diacritics'>Keyboard layout for combining diacritics</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I completed the stage that takes <a href="http://gitweb.freedesktop.org/?p=xkeyboard-config.git;a=tree;f=symbols" target="_blank">keyboard layout files from XKB (X.Org)</a> and converts them to XML documents, based on a <a href="http://code.google.com/p/keyboardlayouteditor/source/browse/trunk/XKBGrammar/xkb.rng" target="_blank">keyboard layout Relax NG schema</a>. Then, these XML documents can also be converted back to keyboard layout files.</p>
<p>Here is an imaginary example of a keyboard layout file.</p>
<pre style="padding-left: 30px;">// Keyboard layout for the Zzurope country (code: zz).
// Yeah.

partial alphanumeric_keys alternate_group hidden
xkb_symbols "bare" {
   key &lt;AE01&gt; { [        1, exclam,      onesuperior,  exclamdown      ] };
};

partial alphanumeric_keys alternate_group
xkb_symbols "basic" {
   name[Group1] = "ZZurope";

   include "zz(bare)"

   key &lt;AD04&gt; { [        r, R,           ediaeresis,   Ediaeresis      ] };
   key &lt;AC07&gt; { [        j, J,           idiaeresis,   Idiaeresis      ] };
   key &lt;AB02&gt; { [        x, X,           oe,           OE              ] };
   key &lt;AB04&gt; { [        v, V,           registered,   registered      ] };
};

partial alphanumeric_keys alternate_group
xkb_symbols "extended" {
    include "zz(basic)"
    name[Group1] = "ZZurope Extended";
    key.type = "THREE_LEVEL"; // We use three levels.
    override key &lt;AD01&gt; {   type[Group1] = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC",</pre>
<pre style="padding-left: 30px;">[ U1C9, U1C8], [  any,   U1C7 ]   }; // q
    override key &lt;AD02&gt; {   [ U1CC, U1CB, any,U1CA ],</pre>
<pre style="padding-left: 30px;">type[Group1] = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC" }; // w</pre>
<pre>    key &lt;BKSP&gt; {</pre>
<pre>        type[Group1]="CTRL+ALT",</pre>
<pre>        symbols[Group1]= [ BackSpace,   Terminate_Server ]</pre>
<pre>    };</pre>
<pre>    key &lt;BKSR&gt; { virtualMods = AltGr, [ 1, 2 ] };</pre>
<pre>    modifier_map Control { Control_L };</pre>
<pre>    modifier_map Mod5   { &lt;LVL3&gt;, &lt;MDSW&gt; };</pre>
<pre>    key &lt;BKST&gt; { [1, 2,3, 4] };</pre>
<pre style="padding-left: 30px;">};</pre>
<p>When converted to an XML document, it looks like</p>
<pre style="padding-left: 30px;">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;layout layoutname="zz"&gt;
  &lt;symbols&gt;
    &lt;mapoption&gt;hidden&lt;/mapoption&gt;
    &lt;mapoption&gt;xkb_symbols&lt;/mapoption&gt;
    &lt;mapname&gt;bare&lt;/mapname&gt;
    &lt;mapmaterial&gt;
      &lt;tokenkey override="False"&gt;
        &lt;keycodename&gt;AE01&lt;/keycodename&gt;
        &lt;keysymgroup&gt;
          &lt;symbolsgroup&gt;
            &lt;symbol&gt;1&lt;/symbol&gt;
            &lt;symbol&gt;exclam&lt;/symbol&gt;
            &lt;symbol&gt;onesuperior&lt;/symbol&gt;
            &lt;symbol&gt;exclamdown&lt;/symbol&gt;
          &lt;/symbolsgroup&gt;
        &lt;/keysymgroup&gt;
      &lt;/tokenkey&gt;
    &lt;/mapmaterial&gt;
  &lt;/symbols&gt;
  &lt;symbols&gt;
    &lt;mapoption&gt;xkb_symbols&lt;/mapoption&gt;
    &lt;mapname&gt;basic&lt;/mapname&gt;
    &lt;mapmaterial&gt;
      &lt;tokenname name="ZZurope"/&gt;
      &lt;tokeninclude&gt;zz(bare)&lt;/tokeninclude&gt;
      &lt;tokenkey override="False"&gt;
        &lt;keycodename&gt;AD04&lt;/keycodename&gt;
        &lt;keysymgroup&gt;
          &lt;symbolsgroup&gt;
            &lt;symbol&gt;r&lt;/symbol&gt;
            &lt;symbol&gt;R&lt;/symbol&gt;
            &lt;symbol&gt;ediaeresis&lt;/symbol&gt;
            &lt;symbol&gt;Ediaeresis&lt;/symbol&gt;
          &lt;/symbolsgroup&gt;
        &lt;/keysymgroup&gt;
      &lt;/tokenkey&gt;
      &lt;tokenkey override="False"&gt;
        &lt;keycodename&gt;AC07&lt;/keycodename&gt;
        &lt;keysymgroup&gt;
          &lt;symbolsgroup&gt;
            &lt;symbol&gt;j&lt;/symbol&gt;
            &lt;symbol&gt;J&lt;/symbol&gt;
            &lt;symbol&gt;idiaeresis&lt;/symbol&gt;
            &lt;symbol&gt;Idiaeresis&lt;/symbol&gt;
          &lt;/symbolsgroup&gt;
        &lt;/keysymgroup&gt;
      &lt;/tokenkey&gt;
      &lt;tokenkey override="False"&gt;
        &lt;keycodename&gt;AB02&lt;/keycodename&gt;
        &lt;keysymgroup&gt;
          &lt;symbolsgroup&gt;
            &lt;symbol&gt;x&lt;/symbol&gt;
            &lt;symbol&gt;X&lt;/symbol&gt;
            &lt;symbol&gt;oe&lt;/symbol&gt;
            &lt;symbol&gt;OE&lt;/symbol&gt;
          &lt;/symbolsgroup&gt;
        &lt;/keysymgroup&gt;
      &lt;/tokenkey&gt;
      &lt;tokenkey override="False"&gt;
        &lt;keycodename&gt;AB04&lt;/keycodename&gt;
        &lt;keysymgroup&gt;
          &lt;symbolsgroup&gt;
            &lt;symbol&gt;v&lt;/symbol&gt;
            &lt;symbol&gt;V&lt;/symbol&gt;
            &lt;symbol&gt;registered&lt;/symbol&gt;
            &lt;symbol&gt;registered&lt;/symbol&gt;
          &lt;/symbolsgroup&gt;
        &lt;/keysymgroup&gt;
      &lt;/tokenkey&gt;
    &lt;/mapmaterial&gt;
  &lt;/symbols&gt;
  &lt;symbols&gt;
    &lt;mapoption&gt;xkb_symbols&lt;/mapoption&gt;
    &lt;mapname&gt;extended&lt;/mapname&gt;
    &lt;mapmaterial&gt;
      &lt;tokenname name="ZZurope Extended"/&gt;
      &lt;tokeninclude&gt;zz(basic)&lt;/tokeninclude&gt;
      &lt;tokentype&gt;THREE_LEVEL&lt;/tokentype&gt;
      &lt;tokenmodifiermap state="Control"&gt;
        &lt;keycode value="Control_L"/&gt;
      &lt;/tokenmodifiermap&gt;
      &lt;tokenmodifiermap state="Mod5"&gt;
        &lt;keycodex value="LVL3"/&gt;
        &lt;keycodex value="MDSW"/&gt;
      &lt;/tokenmodifiermap&gt;
      &lt;tokenkey override="True"&gt;
        &lt;keycodename&gt;AD01&lt;/keycodename&gt;
        &lt;keysymgroup&gt;
          &lt;symbolsgroup&gt;
            &lt;symbol&gt;U1C9&lt;/symbol&gt;
            &lt;symbol&gt;U1C8&lt;/symbol&gt;
          &lt;/symbolsgroup&gt;
          &lt;symbolsgroup&gt;
            &lt;symbol&gt;any&lt;/symbol&gt;
            &lt;symbol&gt;U1C7&lt;/symbol&gt;
          &lt;/symbolsgroup&gt;
          &lt;typegroup value="SEPARATE_CAPS_AND_SHIFT_ALPHABETIC"/&gt;
        &lt;/keysymgroup&gt;
      &lt;/tokenkey&gt;
      &lt;tokenkey override="True"&gt;
        &lt;keycodename&gt;AD02&lt;/keycodename&gt;
        &lt;keysymgroup&gt;
          &lt;symbolsgroup&gt;
            &lt;symbol&gt;U1CC&lt;/symbol&gt;
            &lt;symbol&gt;U1CB&lt;/symbol&gt;
            &lt;symbol&gt;any&lt;/symbol&gt;
            &lt;symbol&gt;U1CA&lt;/symbol&gt;
          &lt;/symbolsgroup&gt;
          &lt;typegroup value="SEPARATE_CAPS_AND_SHIFT_ALPHABETIC"/&gt;
        &lt;/keysymgroup&gt;
      &lt;/tokenkey&gt;
      &lt;tokenkey override="False"&gt;
        &lt;keycodename&gt;BKSP&lt;/keycodename&gt;
        &lt;keysymgroup&gt;
          &lt;symbolsgroup&gt;
            &lt;symbol&gt;BackSpace&lt;/symbol&gt;
            &lt;symbol&gt;Terminate_Server&lt;/symbol&gt;
          &lt;/symbolsgroup&gt;
          &lt;typegroup value="CTRL+ALT"/&gt;
        &lt;/keysymgroup&gt;
      &lt;/tokenkey&gt;
      &lt;tokenkey override="False"&gt;
        &lt;keycodename&gt;BKSR&lt;/keycodename&gt;
        &lt;keysymgroup&gt;
          &lt;symbolsgroup&gt;
            &lt;symbol&gt;1&lt;/symbol&gt;
            &lt;symbol&gt;2&lt;/symbol&gt;
          &lt;/symbolsgroup&gt;
          &lt;tokenvirtualmodifiers value="AltGr"/&gt;
        &lt;/keysymgroup&gt;
      &lt;/tokenkey&gt;
      &lt;tokenkey override="False"&gt;
        &lt;keycodename&gt;BKST&lt;/keycodename&gt;
        &lt;keysymgroup&gt;
          &lt;symbolsgroup&gt;
            &lt;symbol&gt;1&lt;/symbol&gt;
            &lt;symbol&gt;2&lt;/symbol&gt;
            &lt;symbol&gt;3&lt;/symbol&gt;
            &lt;symbol&gt;4&lt;/symbol&gt;
          &lt;/symbolsgroup&gt;
        &lt;/keysymgroup&gt;
      &lt;/tokenkey&gt;
    &lt;/mapmaterial&gt;
  &lt;/symbols&gt;
&lt;/layout&gt;
</pre>
<p>When we convert the XML document back to the XKB format, it looks like</p>
<pre style="padding-left: 30px;">hidden xkb_symbols "bare"
{
	key &lt;AE01&gt; { [ 1, exclam, onesuperior, exclamdown ] };
};

xkb_symbols "basic"
{
	name = "ZZurope";
	include "zz(bare)"
	key &lt;AD04&gt; { [ r, R, ediaeresis, Ediaeresis ] };
	key &lt;AC07&gt; { [ j, J, idiaeresis, Idiaeresis ] };
	key &lt;AB02&gt; { [ x, X, oe, OE ] };
	key &lt;AB04&gt; { [ v, V, registered, registered ] };
};

xkb_symbols "extended"
{
	name = "ZZurope Extended";
	include "zz(basic)"
	key.type = "THREE_LEVEL";
	modifier_map Control { Control_L };
	modifier_map Mod5 { &lt;LVL3&gt;, &lt;MDSW&gt; };
	override key &lt;AD01&gt; { [ U1C9, U1C8 ], [ any, U1C7 ], type = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC"  };
	override key &lt;AD02&gt; { [ U1CC, U1CB, any, U1CA ], type = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC"  };
	key &lt;BKSP&gt; { [ BackSpace, Terminate_Server ], type = "CTRL+ALT"  };
	key &lt;BKSR&gt; { [ 1, 2 ], virtualMods = AltGr  };
	key &lt;BKST&gt; { [ 1, 2, 3, 4 ] };
};
</pre>
<p>Some things are missing such as <em>partial</em>, <em>alphanumeric_keys</em> and <em>alternate_group</em>, which I discussed with <a href="http://blogs.gnome.org/sudaltsov/" target="_blank">Sergey</a> and he said they should be ok to go away.</p>
<p>In addition, we simplify by keeping just Group1 (we do not specify it, as it is implied).</p>
<p>I performed the round-trip with all layout files, and all parsed and validated OK (there is some extra work with the <em>level3</em> file remaining, though).</p>
<p>Some issues that are remaining, include</p>
<ul>
<li>Figuring out how to use XLink to link to documents in the same folder (+providing a parameter; the name of the variant), and how to represent that in the Relax NG schema.</li>
<li>Sort the layout entries by keycode value.</li>
</ul>
<p>Related posts:<ol>
<li><a href='http://simos.info/blog/archives/683' rel='bookmark' title='Parsing XKB files with antlr'>Parsing XKB files with antlr</a></li>
<li><a href='http://simos.info/blog/archives/684' rel='bookmark' title='Looking into the symbol files'>Looking into the symbol files</a></li>
<li><a href='http://simos.info/blog/archives/13' rel='bookmark' title='Keyboard layout for combining diacritics'>Keyboard layout for combining diacritics</a></li>
</ol></p><p><small><a href="http://simos.info/blog/archives/689#comments">4 comments</a></small></p>]]></content:encoded>
			<wfw:commentRss>http://simos.info/blog/archives/689/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ANTLR grammar for XKB, and Relax NG schema (draft)</title>
		<link>http://simos.info/blog/archives/686?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=antlr-grammar-for-xkb-and-relax-ng-schema-draft</link>
		<comments>http://simos.info/blog/archives/686#comments</comments>
		<pubDate>Wed, 11 Jun 2008 21:01:12 +0000</pubDate>
		<dc:creator>Simos Xenitellis</dc:creator>
				<category><![CDATA[fdo]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[planetellak]]></category>
		<category><![CDATA[antlr]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[proj]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tax]]></category>
		<category><![CDATA[xkb]]></category>
		<category><![CDATA[xorg]]></category>

		<guid isPermaLink="false">http://simos.info/blog/?p=686</guid>
		<description><![CDATA[I completed the ANTLRv3 grammar for symbols/ configuration files of XKB. The grammar can parse and create the abstract syntax tree (AST) for all keyboard layouts in xkeyboard-config. ANTLRv3 helps you create parsers for domain specific languages (DSL), an example of which is the configuration files in XKB. Having the ANTLRv3 grammar for a configuration [...]
Related posts:<ol>
<li><a href='http://simos.info/blog/archives/683' rel='bookmark' title='Parsing XKB files with antlr'>Parsing XKB files with antlr</a></li>
<li><a href='http://simos.info/blog/archives/684' rel='bookmark' title='Looking into the symbol files'>Looking into the symbol files</a></li>
<li><a href='http://simos.info/blog/archives/689' rel='bookmark' title='Converting between XKB and XML'>Converting between XKB and XML</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/keyboardlayouteditor/source/browse" target="_blank">I completed</a> the <a href="http://www.antlr.org/" target="_blank">ANTLRv3</a> grammar for <a href="http://gitweb.freedesktop.org/?p=xkeyboard-config.git;a=tree;f=symbols" target="_blank">symbols/ configuration files</a> of XKB. <a href="http://code.google.com/p/keyboardlayouteditor/source/browse/trunk/XKBGrammar/XKBGrammar.g" target="_blank">The grammar</a> can parse and create the abstract syntax tree (AST) for all keyboard layouts in xkeyboard-config.</p>
<p>ANTLRv3 helps you create parsers for domain specific languages (DSL), an example of which is the configuration files in XKB.</p>
<p>Having the ANTLRv3 grammar for a configuration file allows to generate code in any of the supported target lagnuages (C, C++, Java, Python, C#, etc), so that you easily include a parser that reads those files. Essentially you avoid using custom parsers which can be difficult to maintain, or parsers that were generated with flex/bison.</p>
<p>On a similar note, here is the <a href="http://code.google.com/p/keyboardlayouteditor/source/browse/trunk/Compose/Compose.g" target="_blank">grammar to parse Compose files</a> (such as <a href="http://gitweb.freedesktop.org/?p=xorg/lib/libX11.git;a=tree;f=nls/en_US.UTF-8" target="_blank">en_US.UTF-8/Compose.pre</a>). I am not going to be using in the project for now, but it was fun writing it. The Python target takes 18s to create the AST for the &gt;5500 lines of the en_US.UTF-8 compose file, on a typical modern laptop.</p>
<p>I am also working on creating a RelaxNG schema for the XKB configuration files (those under symbols/). There is <a href="http://code.google.com/p/keyboardlayouteditor/source/browse/trunk/XKBGrammar/xkb.rng" target="_blank">a draft available</a>, which needs much more work.The <a href="http://books.xmlschemata.org/relaxng/" target="_blank">Relax NG book by Eric van de Vlist</a> is very useful here.</p>
<p>The immediate goal is to use the code generated by ANTLR to parse the XKB files and create XML files based on the Relax NG schema. I am using Python, and there are a few options; the libxml2 bindings for Python, and <a href="http://pyxml.sourceforge.net/topics/" target="_blank">PyXML</a>. The latter has more visible documentation, but I think that I should better be using the former.</p>
<p><strong>Update</strong>: <a href="http://codespeak.net/lxml/" target="_blank">lxml</a> appears to be the nice way to use libxml2 (instead of using directly libxml2).</p>
<p>Related posts:<ol>
<li><a href='http://simos.info/blog/archives/683' rel='bookmark' title='Parsing XKB files with antlr'>Parsing XKB files with antlr</a></li>
<li><a href='http://simos.info/blog/archives/684' rel='bookmark' title='Looking into the symbol files'>Looking into the symbol files</a></li>
<li><a href='http://simos.info/blog/archives/689' rel='bookmark' title='Converting between XKB and XML'>Converting between XKB and XML</a></li>
</ol></p><p><small><a href="http://simos.info/blog/archives/686#comments">No comment</a></small></p>]]></content:encoded>
			<wfw:commentRss>http://simos.info/blog/archives/686/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looking into the symbol files</title>
		<link>http://simos.info/blog/archives/684?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=looking-into-the-symbol-files</link>
		<comments>http://simos.info/blog/archives/684#comments</comments>
		<pubDate>Wed, 28 May 2008 21:41:53 +0000</pubDate>
		<dc:creator>Simos Xenitellis</dc:creator>
				<category><![CDATA[fdo]]></category>
		<category><![CDATA[planetellak]]></category>
		<category><![CDATA[acer]]></category>
		<category><![CDATA[antlr]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[character]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[eu]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[latin]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[nat]]></category>
		<category><![CDATA[proj]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[xkb]]></category>

		<guid isPermaLink="false">http://simos.info/blog/?p=684</guid>
		<description><![CDATA[In the previous post, we talked about the ANTLR grammar that parses the XKB layout files. The grammar is available at http://code.google.com/p/keyboardlayouteditor/source/browse. I'll rather push to the freedesktop repository once the project is completed. Now it's too easy for me, just doing svn commit -m something. Below you can see the relevant layout files for [...]
Related posts:<ol>
<li><a href='http://simos.info/blog/archives/683' rel='bookmark' title='Parsing XKB files with antlr'>Parsing XKB files with antlr</a></li>
<li><a href='http://simos.info/blog/archives/689' rel='bookmark' title='Converting between XKB and XML'>Converting between XKB and XML</a></li>
<li><a href='http://simos.info/blog/archives/686' rel='bookmark' title='ANTLR grammar for XKB, and Relax NG schema (draft)'>ANTLR grammar for XKB, and Relax NG schema (draft)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In the previous post, we talked about <a href="http://simos.info/blog/archives/683" target="_blank">the ANTLR grammar that parses the XKB layout files</a>.</p>
<p>The grammar is available at <a href="http://code.google.com/p/keyboardlayouteditor/source/browse" target="_blank">http://code.google.com/p/keyboardlayouteditor/source/browse</a>. I'll rather push to the freedesktop repository once the project is completed. Now it's too easy for me, just doing <em>svn commit -m something</em>.</p>
<p>Below you can see the relevant layout files for each country (and in some cases, language), and how the grammar deals with them. First column is filenames from the <a href="http://webcvs.freedesktop.org/xkeyboard-config/xkeyboard-config/symbols/" target="_blank">CVS XKB symbols subdirectory</a> (to be moved eminently to GIT). Last's week discussion with <a href="http://blogs.gnome.org/sudaltsov/" target="_blank">Sergey</a> helped me figure out issues with the symbol files, simplify what information is needed, and what can be eliminated. Second column has Not OK if something is wrong. Third column tries to explain what was wrong.</p>
<table style="height: 1785px;" border="0" cellspacing="0" width="449" frame="void" rules="none">
<tbody>
<tr>
<td width="67" height="17" align="left">ad</td>
<td width="41" align="left"></td>
<td width="132" align="left"></td>
</tr>
<tr>
<td height="17" align="left">af</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">al</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">altwin</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">am</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">ara</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">az</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">ba</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">bd</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">be</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">bg</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">br</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">braille</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">bt</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">by</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">ca</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">capslock</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">cd</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">ch</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">cn</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">compose</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">ctrl</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">cz</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">de</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">dk</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">ee</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">epo</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">es</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">et</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">eurosign</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">fi</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">fo</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">fr</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">gb</td>
<td align="left">NOK</td>
<td align="left">Non-UTF8</td>
</tr>
<tr>
<td height="17" align="left">ge</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">gh</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">gn</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">gr</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">group</td>
<td align="left">NOK</td>
<td align="left">virtualMods= AltGr</td>
</tr>
<tr>
<td height="17" align="left">hr</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">hu</td>
<td align="left">NOK</td>
<td align="left">Non-UTF8</td>
</tr>
<tr>
<td height="17" align="left">ie</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">il</td>
<td align="left">NOK</td>
<td align="left">key.type="FOUR_LEVEL" (typically: key.type[something]=....)</td>
</tr>
<tr>
<td height="17" align="left">in</td>
<td align="left">NOK</td>
<td align="left">key.type="FOUR_LEVEL" (typically: key.type[something]=....)</td>
</tr>
<tr>
<td height="17" align="left">inet</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">iq</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">ir</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">is</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">it</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">jp</td>
<td align="left">NOK</td>
<td align="left">key &lt;BKSP&gt; {<br />
type="",   // empty?<br />
symbols[Group1]= [ bracketright, braceright ]<br />
};</td>
</tr>
<tr>
<td height="17" align="left">keypad</td>
<td align="left">NOK</td>
<td align="left">overlay1=&lt;KO7&gt;  }; // what's "overlay"?</td>
</tr>
<tr>
<td height="17" align="left">kg</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">kh</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">kpdl</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">kr</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">kz</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">la</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">latam</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">latin</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">level3</td>
<td align="left">NOK</td>
<td align="left">virtual_modifiers LAlt, AlGr;  virtualMods= Lalt</td>
</tr>
<tr>
<td height="17" align="left">level5</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">lk</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">lt</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">lv</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">ma</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">mao</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">me</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">mk</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">mm</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">mn</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">mt</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">mv</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">nbsp</td>
<td align="left">NOK</td>
<td align="left">Non-UTF8</td>
</tr>
<tr>
<td height="17" align="left">ng</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">nl</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">no</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">np</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">olpc</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">pc</td>
<td align="left">NOK</td>
<td align="left">key &lt;AA00&gt; { type=”SOMETHING” } instead of { type[Group1]=”SOMETHING” }</td>
</tr>
<tr>
<td height="17" align="left">pk</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">pl</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">pt</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">ro</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">rs</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">ru</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">se</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">shift</td>
<td align="left">NOK</td>
<td align="left">actions [Group1] = [</td>
</tr>
<tr>
<td height="17" align="left">si</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">sk</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">srvr_ctrl</td>
<td align="left">NOK</td>
<td align="left">key &lt;AA00&gt; { type=”SOMETHING” } instead of { type[Group1]=”SOMETHING” }</td>
</tr>
<tr>
<td height="17" align="left">sy</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">th</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">tj</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">tr</td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="17" align="left">ua</td>
<td align="left"></td>
<td align="left"></td>
</tr>
</tbody>
</table>
<p><em>Non-UTF-8</em> are the files that have characters that are not UTF-8 (are iso-8859-1).</p>
<p>Some layouts have key.type = "something" and others key.type[SomeGroup] = "something". Apparently, the format allows to infer which is the group that the type acts upon? That's weird. Would it be better to put the group information? Is it required that the group is not set?</p>
<p>Some files have <em>virtualMods</em>, which I do not know what it is. Is it used?</p>
<p>Related posts:<ol>
<li><a href='http://simos.info/blog/archives/683' rel='bookmark' title='Parsing XKB files with antlr'>Parsing XKB files with antlr</a></li>
<li><a href='http://simos.info/blog/archives/689' rel='bookmark' title='Converting between XKB and XML'>Converting between XKB and XML</a></li>
<li><a href='http://simos.info/blog/archives/686' rel='bookmark' title='ANTLR grammar for XKB, and Relax NG schema (draft)'>ANTLR grammar for XKB, and Relax NG schema (draft)</a></li>
</ol></p><p><small><a href="http://simos.info/blog/archives/684#comments">3 comments</a></small></p>]]></content:encoded>
			<wfw:commentRss>http://simos.info/blog/archives/684/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Parsing XKB files with antlr</title>
		<link>http://simos.info/blog/archives/683?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=parsing-xkb-files-with-antlr</link>
		<comments>http://simos.info/blog/archives/683#comments</comments>
		<pubDate>Sat, 17 May 2008 22:02:48 +0000</pubDate>
		<dc:creator>Simos Xenitellis</dc:creator>
				<category><![CDATA[fdo]]></category>
		<category><![CDATA[planetellak]]></category>
		<category><![CDATA[antlr]]></category>
		<category><![CDATA[cc]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[eu]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[latin]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[nat]]></category>
		<category><![CDATA[ntua]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[xkb]]></category>

		<guid isPermaLink="false">http://simos.info/blog/?p=683</guid>
		<description><![CDATA[antlr (well, antlr3) is an amazing tool that replaces lex/flex, yacc/bison. One would use antlr3 if they want to deal with Domain-Specific Languages (DSL), an example of which are the text configuration files. In our case, we use antlr3 to parse some of the XKB configuration files, those found in /etc/X11/xkb/symbols/??. Our aim is to [...]
Related posts:<ol>
<li><a href='http://simos.info/blog/archives/689' rel='bookmark' title='Converting between XKB and XML'>Converting between XKB and XML</a></li>
<li><a href='http://simos.info/blog/archives/684' rel='bookmark' title='Looking into the symbol files'>Looking into the symbol files</a></li>
<li><a href='http://simos.info/blog/archives/686' rel='bookmark' title='ANTLR grammar for XKB, and Relax NG schema (draft)'>ANTLR grammar for XKB, and Relax NG schema (draft)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.antlr.org/" target="_blank">antlr</a> (well, <a href="http://www.antlr.org/" target="_blank">antlr3</a>) is an amazing tool that replaces lex/flex, yacc/bison.</p>
<p>One would use antlr3 if they want to deal with <a href="http://en.wikipedia.org/wiki/Domain-specific_programming_language" target="_blank">Domain-Specific Languages (DSL)</a>, an example of which are the text configuration files.</p>
<p>In our case, we use antlr3 to parse some of the <a href="http://www.freedesktop.org/wiki/Software/XKeyboardConfig" target="_blank">XKB configuration files</a>, those found in <a href="http://webcvs.freedesktop.org/xkeyboard-config/xkeyboard-config/symbols/" target="_blank">/etc/X11/xkb/symbols/??</a>.</p>
<p>Our aim is to be able to easily read and write those configuration files. Of course, once we have them read, we do all sorts of processing.</p>
<p>The stable version of antlr3 is 3.0.1, which happened to give lots of internal errors. It has not been very useful, so I tried a few times the latest beta version 3.1b, and eventually managed to get it to work. If I am not mistaken, 3.1 stable should be announced in a few days.</p>
<p>When using antlr, you have the choice of several target languages, such as Java, C, C++ and Python. I am using the Python target, and the latest version that is available from the antlr3 repository.</p>
<p>Here is the tree of the <strong>gb</strong> layout file,</p>
<p style="padding-left: 30px;">tree = (SECTION (MAPTYPE (MAPOPTIONS partial default alphanumeric_keys xkb_symbols) (MAPNAME "basic")) (MAPMATERIAL (TOKEN_INCLUDE "latin") (TOKEN_NAME Group1 (VALUE "United Kingdom")) (TOKEN_KEY (KEYCODEX AE02) (KEYSYMS 2 quotedbl twosuperior oneeighth)) (TOKEN_KEY (KEYCODEX AE03) (KEYSYMS 3 sterling threesuperior sterling)) (TOKEN_KEY (KEYCODEX AE04) (KEYSYMS 4 dollar EuroSign onequarter)) (TOKEN_KEY (KEYCODEX AC11) (KEYSYMS apostrophe at dead_circumflex dead_caron)) (TOKEN_KEY (KEYCODEX TLDE) (KEYSYMS grave notsign bar bar)) (TOKEN_KEY (KEYCODEX BKSL) (KEYSYMS numbersign asciitilde dead_grave dead_breve)) (TOKEN_KEY (KEYCODEX LSGT) (KEYSYMS backslash bar bar brokenbar)) (TOKEN_INCLUDE "level3(ralt_switch_multikey)"))) (SECTION (MAPTYPE (MAPOPTIONS partial alphanumeric_keys xkb_symbols) (MAPNAME "intl")) (MAPMATERIAL (TOKEN_INCLUDE "latin") (TOKEN_NAME Group1 (VALUE "United Kingdom - International (with dead keys)")) (TOKEN_KEY (KEYCODEX AE02) (KEYSYMS 2 dead_diaeresis twosuperior onehalf)) (TOKEN_KEY (KEYCODEX AE03) (KEYSYMS 3 sterling threesuperior onethird)) (TOKEN_KEY (KEYCODEX AE04) (KEYSYMS 4 dollar EuroSign onequarter)) (TOKEN_KEY (KEYCODEX AE06) (KEYSYMS 6 dead_circumflex NoSymbol onesixth)) (TOKEN_KEY (KEYCODEX AC11) (KEYSYMS dead_acute at apostrophe bar)) (TOKEN_KEY (KEYCODEX TLDE) (KEYSYMS dead_grave notsign bar bar)) (TOKEN_KEY (KEYCODEX BKSL) (KEYSYMS numbersign dead_tilde bar bar)) (TOKEN_KEY (KEYCODEX LSGT) (KEYSYMS backslash bar bar bar)) (TOKEN_INCLUDE "level3(ralt_switch)"))) (SECTION (MAPTYPE (MAPOPTIONS partial alphanumeric_keys xkb_symbols) (MAPNAME "dvorak")) (MAPMATERIAL (TOKEN_INCLUDE "us(dvorak)") (TOKEN_NAME Group1 (VALUE "United Kingdom - Dvorak")) (TOKEN_KEY (KEYCODEX BKSL) (KEYSYMS numbersign asciitilde)) (TOKEN_KEY (KEYCODEX AE02) (KEYSYMS 2 quotedbl twosuperior NoSymbol)) (TOKEN_KEY (KEYCODEX AE03) (KEYSYMS 3 sterling threesuperior NoSymbol)) (TOKEN_KEY (KEYCODEX AE04) (KEYSYMS 4 dollar EuroSign NoSymbol)) (TOKEN_KEY (KEYCODEX LSGT) (KEYSYMS backslash bar)) (TOKEN_KEY (KEYCODEX AD01) (KEYSYMS apostrophe at)))) (SECTION (MAPTYPE (MAPOPTIONS partial alphanumeric_keys xkb_symbols) (MAPNAME "mac")) (MAPMATERIAL (TOKEN_INCLUDE "latin") (TOKEN_NAME Group1 (VALUE "United Kingdom - Macintosh")) (TOKEN_KEY (KEYCODEX AE02) (KEYSYMS 2 at EuroSign)) (TOKEN_KEY (KEYCODEX AE03) (KEYSYMS 3 sterling numbersign)) (TOKEN_INCLUDE "level3(ralt_switch)")))</p>
<p>When traversing the tree, we can then pretty-print the layout at wish:</p>
<p style="padding-left: 30px;">partial default alphanumeric_keys xkb_symbols "basic" {<br />
name[Group1] = "United Kingdom";<br />
include "latin"<br />
include "level3(ralt_switch_multikey)"<br />
key &lt;AE02&gt; = { [ 2 , quotedbl , twosuperior , oneeighth ] };<br />
key &lt;AE03&gt; = { [ 3 , sterling , threesuperior , sterling ] };<br />
key &lt;AE04&gt; = { [ 4 , dollar , EuroSign , onequarter ] };<br />
key &lt;AC11&gt; = { [ apostrophe , at , dead_circumflex , dead_caron ] };<br />
key &lt;TLDE&gt; = { [ grave , notsign , bar , bar ] };<br />
key &lt;BKSL&gt; = { [ numbersign , asciitilde , dead_grave , dead_breve ] };<br />
key &lt;LSGT&gt; = { [ backslash , bar , bar , brokenbar ] };<br />
};<br />
... snip ...</p>
<p>The code is currently hosted at code.google.com (keyboardlayouteditor) and I intend to move it shortly to FDO.</p>
<p>Related posts:<ol>
<li><a href='http://simos.info/blog/archives/689' rel='bookmark' title='Converting between XKB and XML'>Converting between XKB and XML</a></li>
<li><a href='http://simos.info/blog/archives/684' rel='bookmark' title='Looking into the symbol files'>Looking into the symbol files</a></li>
<li><a href='http://simos.info/blog/archives/686' rel='bookmark' title='ANTLR grammar for XKB, and Relax NG schema (draft)'>ANTLR grammar for XKB, and Relax NG schema (draft)</a></li>
</ol></p><p><small><a href="http://simos.info/blog/archives/683#comments">One comment</a></small></p>]]></content:encoded>
			<wfw:commentRss>http://simos.info/blog/archives/683/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Keyboard Layout Editor GSOC project</title>
		<link>http://simos.info/blog/archives/669?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=keyboard-layout-editor-gsoc-project</link>
		<comments>http://simos.info/blog/archives/669#comments</comments>
		<pubDate>Wed, 30 Apr 2008 22:05:49 +0000</pubDate>
		<dc:creator>Simos Xenitellis</dc:creator>
				<category><![CDATA[fdo]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[cc]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[proj]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[xkb]]></category>

		<guid isPermaLink="false">http://simos.info/blog/?p=669</guid>
		<description><![CDATA[I got accepted for a GSOC project with the X.Org Foundation. My mentor is Sergey Udaltsov and I look forward working with him. The project is about creating a Keyboard Layout Editor, that can be used to edit XKB files with a nice GUI. I will be blogging about these from here (fdo category at [...]
Related posts:<ol>
<li><a href='http://simos.info/blog/archives/747' rel='bookmark' title='The Keyboard Layout Editor'>The Keyboard Layout Editor</a></li>
<li><a href='http://simos.info/blog/archives/695' rel='bookmark' title='Keyboard layout editor UI concept'>Keyboard layout editor UI concept</a></li>
<li><a href='http://simos.info/blog/archives/715' rel='bookmark' title='Layout editor keyboard'>Layout editor keyboard</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I got accepted for a GSOC project with the X.Org Foundation. My mentor is Sergey Udaltsov and I look forward working with him.</p>
<p>The project is about creating a Keyboard Layout Editor, that can be used to edit XKB files with a nice GUI.</p>
<p>I will be blogging about these from here (<em>fdo</em> category at this blog).</p>
<p>Related posts:<ol>
<li><a href='http://simos.info/blog/archives/747' rel='bookmark' title='The Keyboard Layout Editor'>The Keyboard Layout Editor</a></li>
<li><a href='http://simos.info/blog/archives/695' rel='bookmark' title='Keyboard layout editor UI concept'>Keyboard layout editor UI concept</a></li>
<li><a href='http://simos.info/blog/archives/715' rel='bookmark' title='Layout editor keyboard'>Layout editor keyboard</a></li>
</ol></p><p><small><a href="http://simos.info/blog/archives/669#comments">No comment</a></small></p>]]></content:encoded>
			<wfw:commentRss>http://simos.info/blog/archives/669/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

