November Update for KTouch

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.

Last Features

First, I did some work on the layouting code for the training screen.

Screenshot of KTouch trainer

Previously KTouch picked a font and laid out the sheet so the lesson text fit into it. This approach had a few problems:

  • If the lesson contains very long lines the sheet didn't fit into the view port.
  • If the window is maximized on large screens the sheet used only a small amount of the available space.

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 scale attribute to an QML text element results in severely degraded rendering quality. The default transformation origin is the center. With what, fonts will look very 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.

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:

  • Users have to correct their errors with Backspace.
  • Finished lines have to be confirmed with Return.

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.

Screenshot of key hint in trainer

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.

Bugfixes

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.

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.

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 some interest in creating a Chinese course for KTouch, now the technical requirements for that are there.

Handbook

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.

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.

Show Comments