[KTouch] Autogeneration of lessons/courses for custom layouts
Sebastian Gottfried
sebastiangottfried at web.de
Fri Jan 10 08:08:27 UTC 2014
Hi Tslil,
>
> I did some brief hunting about on the IRC channel on this topic and
> was subsequently referred to the ml -- I hope my question is
> relevant.
Yes, this is the right place.
>
> I recently created a custom keyboard layout for my own ends and
> managed to use KTouch to generate the xml stuff in the hopes that I
> might learn this layout using KTouch as a tutor. Naturally, in order
> to learn it there must exist a course and lessons -- thus my
> question. Does there exist a means to generate some lessons wherein
> keys are gradually added (beginning with index fingers on the home row
> I would imagine) until the full keyboard is utilised (even if the
> lessons are all gibberish), for an arbitrary custom layout?
For which keyboard layout did you create a XML description file? Chances are
it's interesting for more people than just you. If this is the case I would
like to include it in the KTouch distribution so everyone can benefit from
your work.
There is no script to generate lessons, see reasons below.
>
> I managed to find a perl script buried in 3.5.x (?) that does
> something mildly related to this, and couldn't really identify the
> functions of the python scripts bundled in the 4.10.0 (?)
> extras/scripts folder. Nevertheless, it would appear that none of
> these perform the task of extracting the keys from the xml document
> and building an entire lesson structure automatically. Does such a
> tool exist? If not, I /may/ be able to construct one -- would anyone
> be interested in such a script?
The 2.x series of KTouch--available since KDE 4.10--uses a new course and
keyboard layout file format. The old formats are really old and did carry lot
of cruft from the old pre-XML days.
The script you found generate lessons in the old format from a word list, but
the results are really poor. Not only the generated lessons are illegible
gibberish, but the script didn't even introduce new characters properly. Often
early lessons did contain letters from later lessons.
The scripts bundled with the new version can be used to convert keyboard
layout and course files from the old format to the new format.
So in theory you can use the old script to generate some lessons and convert
them to the new format, but that's not what I would recommend. Training on
real words and sentences is much more effective (and fun) than training on
random data. That's way I didn't bother to create a new course generation
script.
Instead I rely on human-created lesson for KTouch. This obviously way more
work but I think the result is worth it.
Best regards,
Sebastian
More information about the kde-edu
mailing list