<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[sebasgo]]></title><description><![CDATA[a blog about my hacking adventures]]></description><link>https://blog.sebasgo.net/</link><image><url>https://blog.sebasgo.net/favicon.png</url><title>sebasgo</title><link>https://blog.sebasgo.net/</link></image><generator>Ghost 2.28</generator><lastBuildDate>Wed, 13 Nov 2024 00:40:37 GMT</lastBuildDate><atom:link href="https://blog.sebasgo.net/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Setting up a KPRepublic XD84 Pro PCB for an ISO Keyboard Layout]]></title><description><![CDATA[<p>For a while now, I wanted to build a <a href="https://en.wikipedia.org/wiki/Keyboard_technology#Mechanical-switch_keyboard">mechanical keyboard</a> for myself. For this, I picked the <a href="https://kprepublic.com/products/xd84pro-xd84-pro-custom-mechanical-keyboard-kit-75-supports-tkg-tools-support-underglow-rgb-pcb-programmed-gh84-kle-type-c">XD84 Pro PCB</a> from KPRepublic, since it seems to be the only <a href="https://keyboardwhiz.com/75-percent/">75% keyboard</a> PCB available with USB C connector right now. I don't want to buy any new USB peripherals anymore</p>]]></description><link>https://blog.sebasgo.net/2020/06/25/setting-up-a-kprepublic-xd84-pro-for-an-iso-keyboard-layout/</link><guid isPermaLink="false">5ef31ffb3425100504f743b9</guid><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Thu, 25 Jun 2020 19:59:48 GMT</pubDate><content:encoded><![CDATA[<p>For a while now, I wanted to build a <a href="https://en.wikipedia.org/wiki/Keyboard_technology#Mechanical-switch_keyboard">mechanical keyboard</a> for myself. For this, I picked the <a href="https://kprepublic.com/products/xd84pro-xd84-pro-custom-mechanical-keyboard-kit-75-supports-tkg-tools-support-underglow-rgb-pcb-programmed-gh84-kle-type-c">XD84 Pro PCB</a> from KPRepublic, since it seems to be the only <a href="https://keyboardwhiz.com/75-percent/">75% keyboard</a> PCB available with USB C connector right now. I don't want to buy any new USB peripherals anymore with a Mini or Micro USB connectors. Also 75 % is just the right compromise for me between keyboard size and usability.</p><p>There is plenty of resources available on how to assemble a mechanical keyboard from individual parts. But for this particular PCB, information on how to flash new keyboard layouts was <a href="https://drive.google.com/drive/folders/1W_gEDvrQ4U2cU7-NQ7ChMHBhihs1utPG">very scarce</a>. The PCB came pre-flashed with an <a href="https://deskthority.net/wiki/ANSI_vs_ISO#ANSI">ANSI layout</a>, but I wanted to build an <a href="https://deskthority.net/wiki/ANSI_vs_ISO#ISO">ISO layout</a> keyboard.</p><p>So here are steps to get there: </p><h2 id="design-your-keyboard-layout">Design your keyboard layout</h2><p>One can use the online editor at <a href="http://www.keyboard-layout-editor.com/">keyboard-layout-editor.com</a> for this step. You can start with <a href="http://www.keyboard-layout-editor.com/#/gists/92f50f4f25d2d2b794ca8dd91b508fa3">my layout</a>. It is already adapted for the ISO layout: </p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://blog.sebasgo.net/content/images/2020/06/keyboard_layout.png" class="kg-image"></figure><!--kg-card-end: image--><p>Note the <code>ISO|</code> label on the key next to right shift. Just having <code>|</code> there gives you second <code>#</code>/<code>~</code> key. Otherwise, you can customize the layout to your heart's content. More details about the process can be found at <a href="https://blog.louwii.com/2018/09/xd87-tkl-keyboard-kit-how-to-customize-the-layout-firmware-flash-keyboard/">this excellent blog post</a>.</p><p>In the end, all you need is the text data in from <em>Raw Data</em> tab. Copy it to the clipboard for the next step. For reference, here is mine:</p><!--kg-card-begin: markdown--><pre><code class="language-json">[&quot;Esc\n\n\n\nFn9&quot;,&quot;F1&quot;,&quot;F2&quot;,&quot;F3&quot;,&quot;F4&quot;,&quot;F5&quot;,&quot;F6&quot;,&quot;F7&quot;,&quot;F8&quot;,&quot;F9&quot;,&quot;F10&quot;,&quot;F11&quot;,&quot;F12&quot;,&quot;PSc&quot;,&quot;Ins&quot;,&quot;Delete\n\n\n\nMute&quot;],
[&quot;¬\n`&quot;,&quot;!\n1&quot;,&quot;@\n2&quot;,&quot;#\n3&quot;,&quot;$\n4&quot;,&quot;%\n5&quot;,&quot;^\n6&quot;,&quot;&amp;\n7&quot;,&quot;*\n8&quot;,&quot;(\n9&quot;,&quot;)\n0&quot;,&quot;_\n-&quot;,&quot;+\n=&quot;,{w:2},&quot;Backspace&quot;,&quot;Home&quot;],
[{w:1.5},&quot;Tab&quot;,&quot;Q&quot;,&quot;W&quot;,&quot;E&quot;,&quot;R&quot;,&quot;T&quot;,&quot;Y&quot;,&quot;U&quot;,&quot;I&quot;,&quot;O&quot;,&quot;P&quot;,&quot;{\n[&quot;,&quot;}\n]&quot;,{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},&quot;Enter&quot;,&quot;Page Up\n\n\n\nVolUp&quot;],
[{w:1.75},&quot;Caps Lock&quot;,&quot;A&quot;,&quot;S&quot;,&quot;D&quot;,&quot;F&quot;,&quot;G&quot;,&quot;H&quot;,&quot;J&quot;,&quot;K&quot;,&quot;L&quot;,&quot;:\n;&quot;,&quot;\&quot;\n'&quot;,&quot;~\n#&quot;,{x:1.25},&quot;Page Down\n\n\n\nVolDn&quot;],
[{w:1.25},&quot;Shift&quot;,&quot;ISO|\n\\&quot;,&quot;Z&quot;,&quot;X\n\n\n\nScrLk&quot;,&quot;C\n\n\n\nFn2&quot;,&quot;V\n\n\n\nFn1&quot;,&quot;B\n\n\n\nFn3&quot;,&quot;N&quot;,&quot;M&quot;,&quot;&lt;\n,&quot;,&quot;&gt;\n.&quot;,&quot;?\n/&quot;,{w:1.75},&quot;RShift&quot;,&quot;↑\n\n\n\nFn7&quot;,&quot;End\n\n\n\nFn4&quot;],
[{w:1.25},&quot;Ctrl&quot;,{w:1.25},&quot;Win&quot;,{w:1.25},&quot;Alt&quot;,{w:6.25},&quot;Space&quot;,&quot;RAlt&quot;,&quot;Fn0&quot;,&quot;RCtrl&quot;,&quot;←\n\n\n\nFn5&quot;,&quot;↓\n\n\n\nFn8&quot;,&quot;→\n\n\n\nFn6&quot;]
</code></pre>
<!--kg-card-end: markdown--><h2 id="prepare-for-firmware-flashing">Prepare for Firmware Flashing</h2><p>The easiest way to to flash a new firmware to the PCB is to use the website <a href="https://xd.tkg.io/">https://xd.tkg.io/</a>. To makes this approach work, a few prerequisites must be taken:</p><ol><li>Download and execute the <a href="https://zadig.akeo.ie/">Zadig</a> app. This app makes it easy to install the Windows driver required to flash the firmware.</li><li>Make sure you have <a href="https://www.google.de/chrome/">Google Chrome</a> installed and launch it.</li><li>In Google Chome, install the <a href="https://chrome.google.com/webstore/detail/tkg-chrome-app/kmbmjdabhpdnpeobnbdchihdcdaccidi">TKG Chrome app</a>. This gives <a href="https://xd.tkg.io/">https://xd.tkg.io/</a> the possibility to directly access USB devices in order to flash the new keyboard firmware.</li><li>Connect the PCB to your computer.</li><li>Look for the two solder pads labeled <code>RESET</code> next to the area for the space key. Short them with a pair tweezers. The PCB should reconnect (watch for the Windows notification and the characteristic device unplugged / plugged sound). </li><li>Go to the Zadig app you downloaded earlier. Click on <em>Install WCID Driver</em>. With the keyboard already connected and reset, the app is smart enough to pick the correct driver for you.</li></ol><p>The PCB is now ready for firmware flashing. </p><h3 id="configure-and-flash-the-firmware">Configure and Flash the Firmware</h3><p>Go to <a href="https://xd.tkg.io/">https://xd.tkg.io/</a> with Google Chrome. First, enable the advanced mode in tools menu in the top right corner. Select <code>XD84Pro</code> from the <em>Keyboard</em> menu in the general section. Then paste your keyboard data in the big text box next to <em>Composite Layer</em>. Finally, you need to configure your function keys. I left them as there are in the default XD84 Pro firmware.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://blog.sebasgo.net/content/images/2020/06/firmware_settings.png" class="kg-image"></figure><!--kg-card-end: image--><p>The actual flashing part is really simple. Just click on the green <em>Burn .eep file</em> button at the bottom of the page. After a few seconds the firmware flashing process is completed and the keyboard should be instantly useable with the new keyboard layout. If you are not yet satisfied with your layout and want to repeat the process, you need to reset the keyboard again by shortening the two <code>RESET</code> pads.</p>]]></content:encoded></item><item><title><![CDATA[KTouch in KDE Apps 19.08.0]]></title><description><![CDATA[KTouch has received a considerable update with today's release of KDE Apps 19.08.0 introducing a completely redesigned home screen.]]></description><link>https://blog.sebasgo.net/2019/08/15/ktouch-in-kde-sc-19-08-0/</link><guid isPermaLink="false">5acc8afd305ff804c98c970c</guid><category><![CDATA[KDE]]></category><category><![CDATA[KTouch]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Thu, 15 Aug 2019 14:34:54 GMT</pubDate><content:encoded><![CDATA[<p>KTouch, an application to learn and practice touch typing, has received a considerable update with today's release of <a href="https://kde.org/announcements/announce-applications-19.08.0.php">KDE Apps 19.8.0</a>. It includes a complete redesign for the home screen I have done, which is responsible to select the typing lesson to train on.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card kg-width-wide kg-card-hascaption"><img src="https://blog.sebasgo.net/content/images/2019/08/ktouch_homescreen-3.png" class="kg-image"><figcaption>The new home screen of KTouch</figcaption></figure><!--kg-card-end: image--><p>There is now a new sidebar offering all the courses KTouch has for a total of 34 different keyboard layouts. In previous versions, KTouch presented only the courses matching the current keyboard layout. Now it is much more obvious how to train on different keyboard layouts than the current one.</p><p>Other improvements in this release include:</p><ul><li>Tab focus works now as expected throughout the application and allows training without reaching for the mouse ever.</li><li>Access to training statistics for individual lessons from the home screen has been added.</li><li>KTouch supports now rendering on HiDPI screens.</li></ul><p>KTouch 19.08.0 is available on <a href="https://flathub.org/apps/details/org.kde.ktouch">Flathub</a>, on the <a href="https://snapcraft.io/ktouch">Snap Store</a>, and is coming to <a href="https://community.kde.org/Get_KDE_Software_on_Your_Linux_Distro">your Linux distribution</a>.</p>]]></content:encoded></item><item><title><![CDATA[Sunrise Alarm Clock Project: Pi Dawn]]></title><description><![CDATA[I don't like getting up when it is still dark.]]></description><link>https://blog.sebasgo.net/2019/02/28/sunrise-alarm-clock-pi-dawn/</link><guid isPermaLink="false">5acb113c305ff804c98c9709</guid><category><![CDATA[Pi Dawn]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Thu, 28 Feb 2019 18:42:13 GMT</pubDate><media:content url="https://blog.sebasgo.net/content/images/2019/02/pi-dawn.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><img src="https://blog.sebasgo.net/content/images/2019/02/pi-dawn.jpg" alt="Sunrise Alarm Clock Project: Pi Dawn"><p>I don't like getting up when it is still dark outside.</p>
<p>In the summer time, this is not a problem. The sun rises much earlier than I usually have to get up. But in the winter time it is a different story. So for a few months each year I have a hard time to get going in the morning. To help with this, I  built a sunrise alarm clock.</p>
<!--kg-card-end: markdown--><!--kg-card-end: markdown--><!--kg-card-begin: embed--><figure class="kg-card kg-embed-card"><iframe width="480" height="270" src="https://www.youtube.com/embed/1RfLLPfh-sg?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></figure><!--kg-card-end: embed--><!--kg-card-begin: markdown--><p>I am using this alarm clock now for almost a year and so far it has been a resounding success. While the light is not able to wake me up (I still use a second alarm clock for that) I feel considerably more comfortable and awake when the alarm sounds. The transition from being fast asleep to fully awake feels far less abrupt and is in general just more a pleasant experience. My wife actually wakes up from the dawn simulation.</p>
<h1 id="hardwaresetup">Hardware setup</h1>
<p>I still had a original <a href="https://en.m.wikipedia.org/wiki/Raspberry_Pi">Raspberry Pi</a> model B lying around waiting for a return from retirement. My basic idea was to connect it to a RGB LED strip to simulate an <a href="https://en.wikipedia.org/wiki/Dawn_simulation">artificial sunrise</a>.</p>
<p>There are many kinds of LED strips available, but the family of LED strips based on the WS2801 LED driver are particularly popular for DIY projects. They are cheap, decently bright and each LED can be controlled individually offering 24 bits of color depth. Programming is done over <a href="https://en.m.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus">SPI</a>, a simple serial data interface. It allows one to control the complete LED strip over only two wires. The Raspberry Pi supports SPI natively through its <a href="https://pinout.xyz/pinout/spi">GPIO interface</a>. Thereotically, one has to accommodate the different voltage levels of the Rhaspberry Pi and LED strip. The GPIO of the Rhaspberry Pi operates at 3.3 V while the data lines of the LED strip expect 5 V. The correct solution would be to use a <a href="https://en.wikipedia.org/wiki/Comparator#Level_shifter">level shifter</a> to translate between the different voltages. For me, it worked just fine without the the level shifter.</p>
<p>For my setup, I have ordered 10 m of such a LED strip to build simple low-res LED screen. I have divided the strip into ten 1 m sections which I mounted on peace of plastic ventilation pipe. The pipe is almost white reflecting most scatter light back to the lamp shade. It also offers enough space to hold all components in its internal area. The pipe itself is attached to the core of an old <a href="https://www.ikea.com/gb/en/products/lighting/floor-lamps/magnarp-floor-lamp-natural-art-70232228/">IKEA floor lamp</a> from which I also reused the lamp shade. The end result is indistinguishable from the original lamp as long as you don't switch it on.</p>
<!--kg-card-end: markdown--><!--kg-card-begin: image--><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.sebasgo.net/content/images/2019/02/Pi-Dawn-Assembly-1.jpg" class="kg-image" alt="Sunrise Alarm Clock Project: Pi Dawn"><figcaption>The Pi Dawn hardware assembly. Both the power supply and the Raspberry Pi are mounted to the lamp post. The blue and green wires are signal lined to drive the LED strip. The remaining wires supply the LED strip with power.&nbsp;</figcaption></figure><!--kg-card-end: image--><!--kg-card-begin: markdown--><p>320 LEDs consume a lot of electrical power at maximum brightness. The type of LED strip I have used draws up to 75 mA per LED. At 5 V this gives a maximum total power consumption of 120 W for the whole LED strip. To have a little headroom I used a 150 W power supply. This one has enough reserves to also power the Raspberry Pi so I don't need a dedicated unit for it.</p>
<p>With this, I had an circular, fully-programmable LED screen with a resolution of 10×32 pixels in guise of a regular floor lamp.</p>
<h1 id="software">Software</h1>
<p>Designing and building the hardware setup was a big part of this project, but only the first step toward a usable result. Fortunately, I am much more experienced with building software than hardware.</p>
<p>For the first version I wanted to reach two very basic goals:</p>
<ol>
<li>
<p>make the lamp perform a dawn simulation at programmable times, and</p>
</li>
<li>
<p>provide a user interface to set the alarm times in a comfortable manner.</p>
</li>
</ol>
<p>For the first goal I have chosen to implement a little Python daemon. Its main duty is to wait until it is time for a dawn simulation and then program the LED strep accordingly.</p>
<p>The most challenging part was the display logic for the LED screen. Basic control of the LED screen is super-easy. There are several libraries available which let one directly set pixel values of the LED strip. But getting pleasant results is more complicated than that.</p>
<p>The first hurdle to take is the nonlinear response of the LED strip to luminance changes. Changes in low intensity range are much more apparent than changes near the full light intensity of LEDs. To produce a smooth gradient which doesn't jump almost instantly to full intensity, I had to implement <a href="https://en.wikipedia.org/wiki/Gamma_correction">gamma correction</a>. This is a nonlinear transformation of the luminance values to accord for the logarithmic response of our eyes to light.</p>
<!--kg-card-end: markdown--><!--kg-card-begin: image--><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.sebasgo.net/content/images/2019/02/Pi-Dawn-Gamma-Correction-1.jpg" class="kg-image" alt="Sunrise Alarm Clock Project: Pi Dawn"><figcaption>Side-by-side comparison of driving the LEDs with and without gamma correction. In both cases the lamp renders a linear gradient from full darkness (bottom) to full intensity (top) for the blue color channel. Without gamma correction (left) there is not much of a gradient to see. Subjectively, it reaches full intensity at around one third of the gradient. In real life the effect is even more apparent since my camera struggled to capture the full dynamic range of the scene.</figcaption></figure><!--kg-card-end: image--><!--kg-card-begin: markdown--><p>The next issue I have noticed when I tried the lamp in a dark environment for the first time is the huge perceived difference between a dark LED and a LED shining at very lowest possible intensity. Since the lamp should render a smooth transition from total darkness to full intensity, this is problematic. To gain a little bit more fidelity at the lowest brightness levels, I have implemented <a href="https://en.wikipedia.org/wiki/Ordered_dithering">ordered dithering</a>. It is a simple algorithm to display color graphics on a display with a lower color depth than actually necessary by changing the pixel values slightly in certain patterns to reduce the overall quantization error. It was really popular when monitors could only display 16 or 256 colors. While the LEDs support more than 16 million different colors, dithering still helps at the lowest brightness levels because of the strong non-linear response.</p>
<p>For the user interface I have implemented a web interface optimized for smartphones. It supports setting up alarm times and also acts as a light switch to turn the lamp on or off manually.</p>
<!--kg-card-end: markdown--><!--kg-card-begin: image--><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.sebasgo.net/content/images/2019/02/pi-dawn-ui-1.png" class="kg-image" alt="Sunrise Alarm Clock Project: Pi Dawn"><figcaption>The user interface to set alarms.</figcaption></figure><!--kg-card-end: image--><!--kg-card-begin: markdown--><p>I have implemented the web app with leightweight Python web framework <a href="http://flask.pocoo.org/">Flask</a>. It provides a Restful web API to control the lamp's functions. This API is used by a <a href="https://en.wikipedia.org/wiki/Single-page_application">single page app</a> which hosts the UI code. This was the first time for me after a long break from client-side programming to do JavaScript programming again and to me it was a mixed experience. Especially choosing a framework and getting used to todays JavaScript development tooling is more difficult than it should be. In the end, I picked <a href="https://vuejs.org/">Vue.js</a> plus the <a href="https://vuetifyjs.com/en/">Vue.js Material Component Framework</a> to built the UI. It is quite impressive with how little code one gets decent results, but getting there can be quite a headache for the uninitiated.</p>
<p>The web app needs a way to talk the alarm daemon, preferably with as little delay as possible. I chose <a href="https://redis.io/">Redis</a>  to implement a simple message queue. The web app puts messages for the alarm daemon for state changes (e.g. a new alarm) on the queue. The daemon consumes messages from queue and reacts accordingly. Using Redis on such a low power environment like the original Raspberry Pi was actually a pleasant surprise. It is significantly better performing than the small <a href="https://www.sqlite.org/">SQLite</a> database I use to store the alarm times. A commit to this database often causes a short but noticeable freeze because of the <a href="https://www.sqlite.org/atomiccommit.html">fsync calls SQLite uses for atomic updates</a>. Adding an event to Redis queue is always instantaneous.</p>
<h1 id="buildyourown">Build your own</h1>
<p>All the source code and the setup instructions are available on <a href="https://github.com/sebasgo/rp-sunrise-alarm">Github</a>. Have fun!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[LinuxTag 2014]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>Last week I was attending the <a href="http://www.linuxtag.org/2014/">LinuxTag 2014</a> in Berlin. The plan was to give three workshops--each day one--introducing potential contributors into the wonders of KDE development and otherwise enjoy the event. But <a href="http://blog.jospoortvliet.com/">Jos</a> had other plans for me: he convinced me to man the KDE booth in our shared</p>]]></description><link>https://blog.sebasgo.net/2014/05/15/linuxtag-2014/</link><guid isPermaLink="false">5abb47b4305ff804c98c96e2</guid><category><![CDATA[KDE]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Thu, 15 May 2014 17:10:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>Last week I was attending the <a href="http://www.linuxtag.org/2014/">LinuxTag 2014</a> in Berlin. The plan was to give three workshops--each day one--introducing potential contributors into the wonders of KDE development and otherwise enjoy the event. But <a href="http://blog.jospoortvliet.com/">Jos</a> had other plans for me: he convinced me to man the KDE booth in our shared <a href="http://opensuse.org/">OpenSUSE</a>/<a href="http://owncloud.org/">Owncloud</a>/<a href="http://kde.org">KDE</a> area, so that's what I did, at least for most of the time. This rewarded me with lots of feedback from our user base and I was able to help quite some users with their favorite KDE issue. Also I met a few of my fellow KDE contributors and had a chat with them. All in all it was a fun experience.</p>
<p>The workshops themselves were pretty successful. I had not that much guests, but the few who showed up had all a genuine interest in the topic. In case your interested: The slides for the workshop are <a href="https://db.tt/BGf1YjhF">here</a>, the sources of mentioned demo application--yet another clone of the ubiquitous <a href="http://gabrielecirulli.github.io/2048/">2048</a> game--may be obtained from a <a href="http://quickgit.kde.org/?p=scratch%2Fgottfried%2Fk2048.git">scratch repository</a> of mine.</p>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[New QML Model Types in kqtquickcharts]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>The plugin now provides three new QML types: <code>ChartModel</code> and <code>Record</code>. The first type implements <code>QAbstractTableModel</code>, so it can directly hooked up with a chart as its source model. The other allows to easily describe the model's data in QML making it trivial to draft a simple QML chart demonstration:</p>]]></description><link>https://blog.sebasgo.net/2014/03/12/new-qml-models-type-in-kqtquickcharts/</link><guid isPermaLink="false">5abb47b4305ff804c98c96e1</guid><category><![CDATA[kqtquickcharts]]></category><category><![CDATA[KDE]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Wed, 12 Mar 2014 20:10:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>The plugin now provides three new QML types: <code>ChartModel</code> and <code>Record</code>. The first type implements <code>QAbstractTableModel</code>, so it can directly hooked up with a chart as its source model. The other allows to easily describe the model's data in QML making it trivial to draft a simple QML chart demonstration:</p>
<pre><code class="language-javascript">import QtQuick 1.1
import org.kde.charts 0.1

Rectangle {
    color: &quot;white&quot;
    width: 800
    height: 400

    ChartModel {
        id: chartModel
        columns: 2

        Record {
            values: [0.1, 0.2]
        }
        Record {
            values: [0.25, 0.3]
        }
        Record {
            values: [0.5, 0.5]
        }
        Record {
            values: [1.0, 0.75]
        }
    }

    Column {
        anchors.fill: parent
        anchors.margins: 20
        spacing: 20

        LineChart {
            model: chartModel
            width: parent.width
            height: parent.height - legend.height - parent.spacing
            pitch: 180
            dimensions: [
                Dimension {
                    id: funDimension
                    color: &quot;#ffd500&quot;
                    dataColumn: 0
                    minimumValue: 0.0
                    maximumValue: 1.0
                    label: &quot;Fun&quot;
                    precision: 0
                    unit: &quot; %&quot;
                    unitFactor: 100.0
                },
                Dimension {
                    id: profitDimension
                    color: &quot;#ff0000&quot;
                    dataColumn: 1
                    minimumValue: 0.0
                    maximumValue: 1.0
                    label: &quot;Profit&quot;
                    precision: 0
                    unit: &quot; %&quot;
                    unitFactor: 100.0
                }
            ]
        }

        Row {
            id: legend
            spacing: 30
            anchors.horizontalCenter: parent.horizontalCenter

            LegendItem {
                dimension: funDimension
            }
            LegendItem {
                dimension: profitDimension
            }
        }
    }
}
</code></pre>
<p>The file can be directly run with <strong>qmlviewer</strong>, in fact I have used it to generate the <a href="https://blog.sebasgo.net/content/images/screenshots/kqtquickcharts/linechart_20140228.png">screenshot</a> in the <a href="https://blog.sebasgo.net/2014/02/28/announcing-kqtquickcharts/">original announcement</a> for this project.<sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup> There are no C++ components required anymore to leverage the charts plugin.<sup class="footnote-ref"><a href="#fn2" id="fnref2">[2]</a></sup></p>
<p>The way the demo employs <code>ChartModel</code> obviously doesn't reflect how most applications want to use the charts plugin. Static data isn't encountered what often after all. For this case <code>ChartModel</code> offers a set of methods to dynamically manage its data. I am currently developing a second, more complex demo illustrating their use.</p>
<p><strong>Update Mar 12th, 2014:</strong> The seperate <code>Value</code> type is gone by now. I have updated both text and the code sample reflecting changes.</p>
<hr class="footnotes-sep">
<section class="footnotes">
<ol class="footnotes-list">
<li id="fn1" class="footnote-item"><p>By that time, the model implementation was still in a very early stage and since the demo depends on it, I hadn't published it yet. <a href="#fnref1" class="footnote-backref">↩︎</a></p>
</li>
<li id="fn2" class="footnote-item"><p>Supplying a C++ model is still an option, though. <a href="#fnref2" class="footnote-backref">↩︎</a></p>
</li>
</ol>
</section>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Announcing kqtquickcharts]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p><a href="https://projects.kde.org/projects/kde/kdeedu/kqtquickcharts"><strong>kqtquickcharts</strong></a> is a <a href="http://qt-project.org/doc/qt-4.8/qml-intro.html">Qt Quick 1</a> plugin for beautiful and interactive charts. It offers QML elements for line and bar charts to present numeric data from a model implementing the interface of <a href="http://qt-project.org/doc/qt-4.8/qabstracttablemodel.html"><code>QAbstractTableModel</code></a>.</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/kqtquickcharts/linechart_20140228.png" alt="kqtquicharts in action"></p>
<p>The plugin will see its first release as a part of KDE Edu with KDE SC 4.</p>]]></description><link>https://blog.sebasgo.net/2014/02/28/announcing-kqtquickcharts/</link><guid isPermaLink="false">5abb47b4305ff804c98c96e0</guid><category><![CDATA[kqtquickcharts]]></category><category><![CDATA[KDE]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Fri, 28 Feb 2014 14:10:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p><a href="https://projects.kde.org/projects/kde/kdeedu/kqtquickcharts"><strong>kqtquickcharts</strong></a> is a <a href="http://qt-project.org/doc/qt-4.8/qml-intro.html">Qt Quick 1</a> plugin for beautiful and interactive charts. It offers QML elements for line and bar charts to present numeric data from a model implementing the interface of <a href="http://qt-project.org/doc/qt-4.8/qabstracttablemodel.html"><code>QAbstractTableModel</code></a>.</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/kqtquickcharts/linechart_20140228.png" alt="kqtquicharts in action"></p>
<p>The plugin will see its first release as a part of KDE Edu with KDE SC 4.13 on April 16, 2014. Future efforts will be aimed at making the plugin viable for pure QML applications and to port it to Qt Quick 2.</p>
<p>This project is the result of an effort to make the charts originally developed for KTouch available to a greater audience. The first new application to make use of the components will be <a href="http://techbase.kde.org/Projects/Edu/Artikulate"><strong>artikulate</strong></a>, an upcoming KDE Edu application to improve one's pronunciation skills.</p>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[What is new for KTouch in KDE SC 4.12]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>It has been quite a while since my last post. My time available for KDE development has dried up since then considerably, limiting the scope of my work to basic maintenance and user support. Time for actual programming, let alone writing about it, was rather scarce.</p>
<p>Luckily this state has</p>]]></description><link>https://blog.sebasgo.net/2013/11/12/what-is-new-for-ktouch-in-kde-sc-4-dot-12/</link><guid isPermaLink="false">5abb47b4305ff804c98c96df</guid><category><![CDATA[KTouch]]></category><category><![CDATA[KDE]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Tue, 12 Nov 2013 11:55:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>It has been quite a while since my last post. My time available for KDE development has dried up since then considerably, limiting the scope of my work to basic maintenance and user support. Time for actual programming, let alone writing about it, was rather scarce.</p>
<p>Luckily this state has largely come to an end. And on top of that I was invited to attend this year's <a href="http://dot.kde.org/2013/11/11/kde-edu-2013-sprint">KDE Edu sprint</a> in A Coruña. The sprint was, as usual, highly productive and motivating. Many thanks go to the <a href="http://ev.kde.org/">KDE e.V.</a> and <a href="http://www.gpul.org/">GPUL</a> for sponsoring the event, to <a href="http://www.kde-espana.org/">KDE España</a> for covering my traveling expenses and especially to José Millán Soto for organizing the event.</p>
<p>During the sprint, many discussions were held and plans were made, and there was, of course, a decent amount of time to for some serious hacking. For the most part I worked on KTouch, and the time was well spend. I was able complete my main goal for the next version of KTouch, 2.2 to be released with KDE SC 4.12.</p>
<p>So let's see what 4.12 will bring for KTouch.</p>
<h2 id="customlessonsupport">Custom Lesson Support</h2>
<p>The probably most missed feature from old version 1.x days returns to KTouch, only in much improved and extended fashion: an easy way to train on arbitrary text.</p>
<p>Technically spoken, this was possible since 2.0, because users could create their own courses and train on them. But the process is still cumbersome and too complex for the task at hand.<sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup> In the old days one could just open a text file and get going. A feature like that is clearly missing.</p>
<p>This solved for the next version by introducing a new special course, the <em>Custom Lessons</em> course, always available right next to the normal built-in courses.</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/homescreen_custom_lessons_20131120.png" alt="Custom lesson selector"></p>
<p>This new special course mostly acts like any other, training and statistics gathering works as usual. Clicking on <em>New Custom Lesson</em> brings up a stripped-down version of the normal lesson editor.</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/homescreen_custom_lesson_editor_20131120.png" alt="Custom lesson editor"></p>
<p>This has the nice side effect that the usual <a href="http://docs.kde.org/stable/en/kdeedu/ktouch/extending.html#quality_checks">quality checks</a> are also performed for custom lessons. The characters of the lesson text are matched against the current keyboard layout, so the user has a realistic chance to spot special or foreign characters he can't type before hitting them during training.<sup class="footnote-ref"><a href="#fn2" id="fnref2">[2]</a></sup></p>
<p>During my work on the custom lesson editor I took also some time to improve the actual lesson text editing experience. Now the editor has a toolbar allowing to load text files and to reformat lesson texts with long lines so they use the recommended line length.</p>
<p>The custom lessons are stored per user profile and keyboard layout, so one can train on different lessons depending on the specific situation.</p>
<p>One nice side effect of the re-introduction of this feature that KTouch is now finally at least basically usable under every keyboard layout, even for those it offers no courses for.</p>
<h2 id="newcourses">New Courses</h2>
<p>Thanks to the to a some generous contributions KTouch will ship a few new courses:</p>
<ul>
<li>A new Farsi course including the corresponding keyboard layout data. Contributed by Seyed Ali Akbar Najafian.</li>
<li>For the Spanish keyboad layout a new couse in Basque. Contributed by Alexander Gabilondo.</li>
<li>And a course for the rather exotic <a href="http://www.workmanlayout.com/">Workman</a> layout. Contributed by Peter Feigl.</li>
</ul>
<p>Many thanks go to the respective authors!</p>
<hr class="footnotes-sep">
<section class="footnotes">
<ol class="footnotes-list">
<li id="fn1" class="footnote-item"><p>To do so, one has (1) discover the editor, (2) create a new course, (3) set the keyboard layout for this course to his own and, (4) finally fill it with one or more lessons. Step (3) will scare off any not-so-tech-savvy user, since it requires technical knowledge and failing to do so will render the course inaccessible in the trainer. Also courses are constructed around the assumption that lessons build up on each other. This doesn't hold true for a collection of random training texts. <a href="#fnref1" class="footnote-backref">↩︎</a></p>
</li>
<li id="fn2" class="footnote-item"><p>This feature depends on the presence of keyboard layout data also used by the keyboard visualization. If missing the checks won't be performed and all characters will be valid. <a href="#fnref2" class="footnote-backref">↩︎</a></p>
</li>
</ol>
</section>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[February Update for KTouch]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>I have expected the February to become a month full of bug fixing because of the the KTouch's release at the beginning of the month, but I haven't received a single valid bug report to date.<sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup> Well, except a few which will be addressed by the the feature I</p>]]></description><link>https://blog.sebasgo.net/2013/03/02/february-update-for-ktouch/</link><guid isPermaLink="false">5abb47b4305ff804c98c96de</guid><category><![CDATA[KTouch]]></category><category><![CDATA[KDE]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Sat, 02 Mar 2013 21:35:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>I have expected the February to become a month full of bug fixing because of the the KTouch's release at the beginning of the month, but I haven't received a single valid bug report to date.<sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup> Well, except a few which will be addressed by the the feature I have been busy working on instead.</p>
<h2 id="lessonrenderingevolved">Lesson Rendering Evolved</h2>
<p>For KTouch 2.0 I have employed a rather simple approach to paint the current training line: for each character of the current line KTouch instantiates a dedicated QML <code>Text</code> item. This way it was easy to apply the styling for the individual states any character can have: placeholder text, typed text, contains a tying error and finally being part of the pre-edit text of some <a href="https://en.wikipedia.org/wiki/Input_method">input methods</a>. It also allowed my to implement the training screen very fast and works well for for Western languages with their simple Latin alphabet.</p>
<p>But this technique shows its deficiencies when used for more complex scripts like <a href="https://en.wikipedia.org/wiki/Arabic_alphabet">Arabic</a> or <a href="https://en.wikipedia.org/wiki/Thai_script">Thai</a>. Because of the use of individual <code>Text</code> items for each character it's impossible to draw <a href="https://en.wikipedia.org/wiki/Typographic_ligature">typographic ligatures</a>. Both of the aforementioned languages rely heavily on them: Arabic joins most letters of a word together, Thai often stacks consecutive letters on top of each other. And for the former it doesn't help either that KTouch currently can't do right-to-left training.</p>
<p>With these issues it is clear KTouch needs new lesson rendering engine.</p>
<p>As of now the new engine is already nearly completed and fixes all the problems outlined above, only a few minor features compared to the old engine and some general code cleanup are still missing. When these are done I will push the changes to the KTouch's central Git repository.</p>
<p>The new engine is now written in C++ as a new custom declarative type. Actually the old and the new approach doesn't differ that much technically: both my custom type and the stock QML <code>Text</code> element leverage a <code>QTextDocument</code> to do the actual text rendering, the difference is only that my component gives me the control over it which I need. And that I now use only one single declarative item for the whole lesson text instead of one per character of the active line and one for each other line.</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/trainer-ara20130302.png" alt="KTouch with an Arabic lesson"></p>
<p>As one can see it is now possible to properly train on Arabic lessons, even though the alignment of the training text is still incorrect.<sup class="footnote-ref"><a href="#fn2" id="fnref2">[2]</a></sup></p>
<p>One nice side effect of doing all the painting in C++ is that it gives me exact control over the font rendering. KTouch uses scaled font rendering to fit the lesson text into the viewport. In this case it's important to disable <a href="https://en.wikipedia.org/wiki/Font_hinting">hinting</a> at least horizontally, because the rendering hints are calculated before scaling and this results in incorrect <a href="https://en.wikipedia.org/wiki/Letter-spacing">letter-spacing</a>. I consider bad letter-spacing to be a <a href="https://xkcd.com/1015/">major nuisance</a>, so I was happy being finally able address this issue in the new C++ component.</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/font-rendering-comparison20130302.png" alt="Fully hinted vs. vertically hinted font rendering"></p>
<p>The first line shows the old, fully hinted font rendering, the second the new font rendering where only vertical hinting is applied. As one can easily observe the letters in the second line are much more evenly spaced out.</p>
<hr class="footnotes-sep">
<section class="footnotes">
<ol class="footnotes-list">
<li id="fn1" class="footnote-item"><p>This either means there are really no issues (rather unlikely) or the existing issues don't get reported. So if you experience problems with KTouch please don't hesitate to report them. <a href="#fnref1" class="footnote-backref">↩︎</a></p>
</li>
<li id="fn2" class="footnote-item"><p>Although the training part of the application has now no problems with right-to-left rendering, the rest of the application has still issues with it. But those are small and easy fix compared to the trainer and will be taken care of soon. <a href="#fnref2" class="footnote-backref">↩︎</a></p>
</li>
</ol>
</section>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[January Update for KTouch]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>This also includes the work done on KTouch in December. With the expected Christmas-related development hiatus I didn't feel overly compelled to write a dedicated update.</p>
<p>And it is also the very last update before the upcoming KDE SC 4.10 release. The final tag freeze was already yesterday, so</p>]]></description><link>https://blog.sebasgo.net/2013/01/31/january-update-for-ktouch/</link><guid isPermaLink="false">5abb47b4305ff804c98c96dd</guid><category><![CDATA[KTouch]]></category><category><![CDATA[KDE]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Thu, 31 Jan 2013 22:40:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>This also includes the work done on KTouch in December. With the expected Christmas-related development hiatus I didn't feel overly compelled to write a dedicated update.</p>
<p>And it is also the very last update before the upcoming KDE SC 4.10 release. The final tag freeze was already yesterday, so this report pretty much reflects the state KTouch will be released in.</p>
<h2 id="bugfixes">Bugfixes</h2>
<p>Since November another dozen of different mostly smallish issues have been fixed, among them the very last crash bug I am aware of. It took me forever to get to the bottom of the issue, even if the solution was always right in front of me. In the end it turned out KTouch's resource editor was another victim of <a href="https://bugs.kde.org/show_bug.cgi?id=303228">kdelibs Bug 303228</a>, a bug report I have stumbled over very early on during my investigations. Too bad if one  can't match two backtraces.</p>
<p>Another significant fix is that KTouch is now able to render properly under a Plasma theme with light text on dark backgrounds (<a href="https://bugs.kde.org/show_bug.cgi?id=312082">Bug 312082</a>). No more impossible-to-read labels because of lack of contrast.</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/scorescreen-dark20130131.png" alt="Screenshot of score screen with dark color scheme"></p>
<h2 id="data">Data</h2>
<p>Thanks to Ludo Beckers KTouch has gained support for the Belgian keyboard layout. As of now we don't have matching course for this layout yet, so unfortunately it is difficult for the user to directly profit from it.</p>
<p>I think the overall data situation may improve, though, once the first release of KTouch 2.0 is out. I hope the <a href="https://blog.sebasgo.net/2012/09/14/the-state-of-ktouch/">new training experience</a> combined with the <a href="https://blog.sebasgo.net/2012/09/21/the-state-of-ktouch-part-ii/">completely overhauled authoring tools</a> are enough of an impetus for new contributors to get some movement in that area.</p>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[November Update for KTouch]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>It has been a quite month for KTouch, with the Feature Freeze in place for the greater part of the month. But this doesn't mean nothing has been done at all.</p>
<h2 id="lastfeatures">Last Features</h2>
<p>First, I did some work on the layouting code for the training screen.</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/trainer20121128.png" alt="Screenshot of KTouch trainer"></p>
<p>Previously KTouch picked a</p>]]></description><link>https://blog.sebasgo.net/2012/11/28/november-update-for-ktouch/</link><guid isPermaLink="false">5abb47b4305ff804c98c96dc</guid><category><![CDATA[KTouch]]></category><category><![CDATA[KDE]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Wed, 28 Nov 2012 15:45:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>It has been a quite month for KTouch, with the Feature Freeze in place for the greater part of the month. But this doesn't mean nothing has been done at all.</p>
<h2 id="lastfeatures">Last Features</h2>
<p>First, I did some work on the layouting code for the training screen.</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/trainer20121128.png" alt="Screenshot of KTouch trainer"></p>
<p>Previously KTouch picked a font and laid out the sheet so the lesson text fit into it. This approach had a few problems:</p>
<ul>
<li>If the lesson contains very long lines the sheet didn't fit into the view port.</li>
<li>If the window is maximized on large screens the sheet used only a small amount of the available space.</li>
</ul>
<p>The new version does it the other way around: the sheet will always fill the horizontally available space and we scale the text so it fits perfectly in there. Especially the latter was way more complicated to implement when I imagined. Calculating the required scaling factor is easy, but naïvely applying a value to the <code>scale</code> attribute to an QML text element results in severely degraded rendering quality. The default transformation origin is the center. With what, fonts will look <em>very</em> blurry. After setting it to top left corner rendering quality was okay, but still not that crisp like without scaling. Any hints to further improve the quality are welcome. I still think the gained flexibility is worth the price.</p>
<p>Secondly, one thing I have repeatedly observed is that users new to KTouch had problems grasping the training mechanisms of KTouch. Two characteristics in particular stood out in that way:</p>
<ul>
<li>Users have to correct their errors with <code>Backspace</code>.</li>
<li>Finished lines have to be confirmed with <code>Return</code>.</li>
</ul>
<p>The keyboard layout visualization always highlights the key the user has to press to go on, but in this cases this has been proven to be ineffective. Therefore I have implemented an additional hint system to help the user to overcome these hurdles: After three key presses after the users has entered one of the aforementioned conditions the key he has press to solve the problem will be displayed right under the current training line.</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/trainer-hint20121128.png" alt="Screenshot of key hint in trainer"></p>
<p>I think those hints are hard to ignore and users accustomed to the behavior won't get distracted by them since they won't see them ever.</p>
<h2 id="bugfixes">Bugfixes</h2>
<p>With these two features done I've spend most of my time on fixing bugs. A good dozen of small and not-so-small issues have been resolved. But one pair of fixes is especially important to the user.</p>
<p>With German being my native tongue--a language which only seldomly requires accented characters--I have only realized very late that handling dead key events in QML alone is impossible right now. This is a problem for KTouch because the event handling for the trainer was implemented in QML only. Many languages KTouchs offers courses for are really depended on working dead keys so I have considered that bug of show stopper severity. Now that I've moved the implementation of the event handling to C++, dead keys are no longer a problem.</p>
<p>While I was active in that particular corner of the codebase I also made sure KTouch works fine with CJK input methods. At least in the past their was <a href="https://bugs.kde.org/show_bug.cgi?id=194819">some interest</a> in creating a Chinese course for KTouch, now the technical requirements for that are there.</p>
<h2 id="handbook">Handbook</h2>
<p>Last but not least KTouch got a new handbook. The version of KTouch to be released with KDE SC 4.10 is a complete rewrite having only few similarities to the previous version. So a rewrite was also due for the handbook. Huge kudos go to Yuri Chornoivan who has stepped up to support me in that area and has been the one doing at least 90% of the work. This was not a small task by any means and I think the results speak for themselves.</p>
<p>With that done we are one step closer to the quality I think is required for a successful initial release. Replacing a peace of established software is always a risky endeavor, so I really don't want to release something half-baked. Having a complete and up-to-date handbook is important part of that to me.</p>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[New Version of KTouch Merged]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>Today I've finally merged my <code>next</code> branch into the <code>master</code> branch. Lately the differences between the two branches became increasingly huge:</p>
<pre><code class="language-bash">$ git log origin/master..origin/next --oneline --no-merges | wc -l
402
$ git --no-pager diff origin/master..origin/next --shortstat -- src/
 252 files changed, 23468 insertions(+), 14282 deletions(-)</code></pre>]]></description><link>https://blog.sebasgo.net/2012/10/24/new-version-of-ktouch-finally-merged/</link><guid isPermaLink="false">5abb47b4305ff804c98c96db</guid><category><![CDATA[KTouch]]></category><category><![CDATA[KDE]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Wed, 24 Oct 2012 16:00:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>Today I've finally merged my <code>next</code> branch into the <code>master</code> branch. Lately the differences between the two branches became increasingly huge:</p>
<pre><code class="language-bash">$ git log origin/master..origin/next --oneline --no-merges | wc -l
402
$ git --no-pager diff origin/master..origin/next --shortstat -- src/
 252 files changed, 23468 insertions(+), 14282 deletions(-)
</code></pre>
<p>Merging all that into the <code>master</code> branch took a huge pressure from me. After spending all that time I spend on working on KTouch it's really important to me get the fruits of my work out to the end-users. Getting my stuff in the the branch KDE SC 4.10 will be released from is first the important step towards that goal.</p>
<p>My next step is clearing out the <a href="https://bugs.kde.org/buglist.cgi?list_id=259489&amp;query_format=advanced&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;product=ktouch">Bugzilla entries</a> against KTouch. The vast majority of the bug reports can be closed since they don't apply anymore, and also a fair share of the reported wishes are met by the new version.</p>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[KTouch Got a New Score Screen]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>So after finishing a lesson that's that the user is going to see now:</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/scorescreen20121214.png" alt="New score screen of KTouch"></p>
<p>With the help of the screen the user can review his learning progress and identify his weaknesses. For that a bar diagram visualizing the errors he has made during the training can be summoned:</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/scorescreen-errors20121214.png" alt="Typing errors in score screen"></p>
<p>If he</p>]]></description><link>https://blog.sebasgo.net/2012/10/14/ktouch-got-a-new-score-screen/</link><guid isPermaLink="false">5abb47b4305ff804c98c96da</guid><category><![CDATA[KTouch]]></category><category><![CDATA[KDE]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Sun, 14 Oct 2012 22:10:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>So after finishing a lesson that's that the user is going to see now:</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/scorescreen20121214.png" alt="New score screen of KTouch"></p>
<p>With the help of the screen the user can review his learning progress and identify his weaknesses. For that a bar diagram visualizing the errors he has made during the training can be summoned:</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/scorescreen-errors20121214.png" alt="Typing errors in score screen"></p>
<p>If he has passed the lesson he may choose to start training on the next lesson right away. Otherwise he can repeat the current lesson or return to the home screen.</p>
<p>The score screen was the last large outstanding feature I am targeting for the initial release. With that one done only a few small ones remain I can easily finish until the Feature Freeze on October 25. So it looks like the new version of KTouch will be actually released with KDE SC 4.10 on January 23, 2013.</p>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Line Graphs for Qt Quick]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>After finishing the keyboard layout editor here in Randa I've started working on the last remaining big task of the upcoming <a href="https://blog.sebasgo.net/2012/09/12/hello-planet/">new version</a> of KTouch: the summary screen which will be shown after the user has completed a lesson. For that I want to display the user's learning progress with</p>]]></description><link>https://blog.sebasgo.net/2012/09/26/line-graphs-for-qt-quick/</link><guid isPermaLink="false">5abb47b4305ff804c98c96d9</guid><category><![CDATA[KTouch]]></category><category><![CDATA[KDE]]></category><category><![CDATA[Qt Quick]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Wed, 26 Sep 2012 11:00:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>After finishing the keyboard layout editor here in Randa I've started working on the last remaining big task of the upcoming <a href="https://blog.sebasgo.net/2012/09/12/hello-planet/">new version</a> of KTouch: the summary screen which will be shown after the user has completed a lesson. For that I want to display the user's learning progress with pretty diagrams. As there are no ready-made components for Qt Quick for that purpose right now, I've sat down and started to implement my own:</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/line_graph20120926.png" alt="Line graph demo"></p>
<p>My QML component to render such graphs is actually pretty generic. Here is the complete code for the screenshot above:</p>
<pre><code class="language-javascript">import QtQuick 1.1
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.plasma.components 0.1 as PlasmaComponents
import org.kde.ktouch.graph 0.1 as Graph
import ktouch 1.0

Rectangle {
    width: 800
    height: 300
    anchors.centerIn: parent
    color: &quot;white&quot;

    Column {
        anchors {
            fill: parent
            topMargin: 2 * spacing + legend.height
            leftMargin: spacing
            rightMargin: spacing
            bottomMargin: spacing
        }

        spacing: 20

        Graph.LineGraph {
            width: parent.width
            height: parent.height - legend.height - parent.spacing
            model: learningProgressModel

            dimensions: [
                Graph.Dimension {
                    id: accuracyDimension
                    dataColumn: 5
                    color: &quot;#ffb12d&quot;
                    maximumValue: 1.0
                    label: i18n(&quot;Accuracy&quot;)
                    unit: &quot;%&quot;
                    unitFactor: 100
                },
                Graph.Dimension {
                    id: charactersPerMinuteDimension
                    dataColumn: 6
                    color: &quot;#38aef4&quot;
                    maximumValue: 400
                    label: i18n(&quot;Characters per Minute&quot;)
                }
            ]
        }

        Row {
            id: legend
            anchors.horizontalCenter: parent.horizontalCenter
            spacing: 20

            Graph.LegendItem {
                dimension: accuracyDimension
            }
            Graph.LegendItem {
                dimension: charactersPerMinuteDimension
            }
        }
    }
}
</code></pre>
<p>The model used as the data source for the graph—<code>learningProgressModel</code>—is just a normal <code>QAbstractTableModel</code> descendant.</p>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[The State of KTouch — Part II]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>This is the second part of my blog post series describing the results of my work on <a href="http://edu.kde.org/applications/all/ktouch/">KTouch</a>. If you haven't read the first part, you can find it <a href="https://blog.sebasgo.net/2012/09/14/the-state-of-ktouch/">here</a>. This time I will write more about the new course and keyboard layout editor.</p>
<p>KTouch can be only as good</p>]]></description><link>https://blog.sebasgo.net/2012/09/21/the-state-of-ktouch-part-ii/</link><guid isPermaLink="false">5abb47b4305ff804c98c96d8</guid><category><![CDATA[KTouch]]></category><category><![CDATA[KDE]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Fri, 21 Sep 2012 19:10:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>This is the second part of my blog post series describing the results of my work on <a href="http://edu.kde.org/applications/all/ktouch/">KTouch</a>. If you haven't read the first part, you can find it <a href="https://blog.sebasgo.net/2012/09/14/the-state-of-ktouch/">here</a>. This time I will write more about the new course and keyboard layout editor.</p>
<p>KTouch can be only as good as the underlying data. Without courses the trainer is basically useless to the user, without the keyboard layouts the visualization of the keyboard during training isn't available. Therefore it's important ships with as much data as possible.</p>
<p>Currently there is support for 39 keyboard layouts and there are 39 courses for 30 keyboard layouts. Unfortunately the quality of the course material varies a lot. There are a few courses of truly outstanding quality, but the most courses have been auto-generated out of dictionaries. Their quality ranges from passable to unusable. Of course none of those have full phrases or sentences in the training data, or provide even complete short texts to train on. A course containing such elements is much more effective and fun to learn.</p>
<p>Therefore I really would like to see more human-created high-quality courses in KTouch. As I can't do anything about it personally (The German courses are already excellent, the only language I feel sufficiently proficient in to write training texts in.) the only thing I can do is to provide the tools to make creating them as easy as possible.</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/course_editor20120921.png" alt="Screenshot of course editor"></p>
<p>That's a screenshot of the new course editor with one of the problematic courses loaded showing one of the built-in quality-assurance checks: if a lesson contains characters not available in that lesson, because they are not among the configured new characters of this lesson or any previous one, they are highlighted in red. There is also a check for too long lines.</p>
<p>On the left side their is a list over all data files KTouch knows about, built-in and user-created alike. If the user selects a built-in resource the editor will degrade to a simple viewer, though. If the user selects a keyboard layout the program will adapt appropriately.</p>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/keyboard_layout_editor20120921.png" alt="Screenshot of keyboard layout editor"></p>
<p>The keyboard layout editor is still a bit unfinished, though: currently there is no way to edit the characters on a key yet.</p>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[The State of KTouch — Part I]]></title><description><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>This post will tell you more about the new features touch typing trainer component of the upcoming version of KTouch, but before I come to that, I will write a little bit about the approach I took to design the new user interface.</p>
<h2 id="designprinciples">Design Principles</h2>
<p>Actually this boils down to</p>]]></description><link>https://blog.sebasgo.net/2012/09/14/the-state-of-ktouch/</link><guid isPermaLink="false">5abb47b4305ff804c98c96d7</guid><category><![CDATA[KTouch]]></category><category><![CDATA[KDE]]></category><dc:creator><![CDATA[Sebastian Gottfried]]></dc:creator><pubDate>Fri, 14 Sep 2012 13:00:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><!--kg-card-begin: markdown--><p>This post will tell you more about the new features touch typing trainer component of the upcoming version of KTouch, but before I come to that, I will write a little bit about the approach I took to design the new user interface.</p>
<h2 id="designprinciples">Design Principles</h2>
<p>Actually this boils down to two simple points:</p>
<h3 id="actlikeagame">Act like a game</h3>
<p>Learning touch typing is boring enough, the application one uses to achieve this goal should make the experience as much funny as possible while not getting in the way. A good way to do so is to borrow some of principles from video games which render them as engaging and addicting as they are.</p>
<h3 id="keepitsimple">Keep it simple</h3>
<p>Learning touch typing should be possible for every literate person. After all, KTouch is an educational application targeted at especially at pupils. So knowledge about technical details like the existence of keyboard layouts can't be assumed. The user interface hast to be designed accordingly.</p>
<h2 id="thenewfeatures">The New Features</h2>
<p>The new user interface is split into several screens, each responsible for a certain feature set. This keeps the complexity low, because it reduces the amount of controls visible at any given time and guides the user on their way through the application.</p>
<h3 id="1thewelcomescreen">1. The Welcome Screen</h3>
<p>{% img /images/screenshots/ktouch/welcome20120914.png%}</p>
<p>This is very first thing a new user of KTouch will see and it is the only setup necessary to start training. It should be pretty much self-explanatory.</p>
<h3 id="2thehomescreen">2. The Home Screen</h3>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/homescreen20120914.png" alt="KTouch Home Screen"></p>
<p>From here the user picks a lesson to train on out of the courses matching their current system keyboard layout. It also provides access to profile managment, the keyboard layout and course editor and the configuration dialogs.</p>
<h3 id="3thetrainer">3. The Trainer</h3>
<p><img src="https://blog.sebasgo.net/content/images/screenshots/ktouch/trainer20120914.png" alt="Screenshot of the KTouch trainer"></p>
<p>That's the part of the application a typical user will spend the most time on. Therefore extra effort went into this screen to make its operation as smooth as possible. Every dynamic part of the user interface is animated in a nice and unobtrusive way. Small features, like stopping the time when the window looses its focus, help to improve the overall training experience. Users wanting an absolute minimum of distraction while training may choose to hide the keyboard and now also the real-time statistics readings in the application settings.</p>
<h3 id="thereismore">There is more</h3>
<p>Careful readers will have noticed, that I mentioned an editor component — this one deserves a post on its own.</p>
<p>After completing a lesson, the user won't return immediately to the home screen. Instead a special summary and statistics screen is shown. Right now it is still largely unfinished, so no screenshot right now.</p>
<p>The good news is that the KDE e.V. gave me the opportunity to attend to the upcoming Randa 2012 sprint. Looking at my todo list, this summary screen will be among my top priority tasks I want to work on in Randa.</p>
<p>Organizing a sprint of this scale costs a lot of money. So if you able to donate some money, please do so. For me as a volunteer developer such an event is an exceptional opportunity, your donation makes it possible. Thank you!</p>
<!--kg-card-end: markdown--><!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>