Choo choo, get on the Key-Train

Well I've done it again, started another open source project. Renata and I want Victor to learn how to touch type, but these days, it's hard to find a school that teaches just that.

So I looked at what available in open source and found KTouch.  It's pretty good however I found some issues with it:
  • The lecture files aren't very obvious. It's not clear, for example, that it has already loaded the default lecture file.
  • The keyboard is rather plain looking.
  • The scrolling text area you type in is nifty, but gets in the way for advanced users.  My typing speed is limited to how fast it can scroll back.  Also, as you get near the end of the line it's becomes difficult to see what characters are coming up, slowing you down and creating additional errors.
  • Like many other typing tutor programs, it shows only one line of text at a time, it's not obvious how many lines you have left to do. The first time I ran it I thought it was going to go on forever.
  • It doesn't teach you proper hand positions very obvious (i.e. it doesn't show a picture of the hands in position).
  • It forces you to learn the space and return key very early.  It also doesn't show you how you should click them (i.e. use the thumbs for the spacebar and pinkie for the enter key).
  • It allows you to type-in mistakes, forcing the student to learn the backspace key very early as well.
  • The progression of keys is rather odd. It teaches the C, N and T keys before G and H keys for example.
  • It doesn't teach all the keys, Comma, Dot, Slash, and Quote keys are never taught, for example.
I also found that the BBC has a nice online keyboard trainer that does a good job in many respects.

I decided to try my hand at making a keyboard training program for Linux with PyGTK.  I already have some experience with keyboards in my key-mon project, although this project looks like it'll be a little bit larger in scope.

Screenshot, so far:

Here's what I want to include, eventually:
  • Show the hand positions.  I'm taking photographs of my hands and digitizing the outline with Inkscape, like I did above.
  • Have a nice looking keyboard, the one above is an early (ugly) version.
  • Show the whole lesson in one big textbox. Thus it will be obvious when you're done and how far you have to go.
  • Use interesting text.  I'm thinking of grabbing pages from Wikipedia (like above) and using that instead of randomized text for the more advanced levels.
  • Use real words when possible. Use the aspell dictionary to verify if the words exist in the chosen language.
  • Use bi-grams and tri-grams from the chosen language instead of random sets of characters (I believe that is what KTouch does as well).
  • Automatically drop incomplete or weird training sessions to not adversely affect the final scores and progression statistics.  For example, you started training and then the phone rang.
  • Have it all scalable, by using SVG for all the graphics.
  • Have lots of options.  For instance:
    • Show (or not) the keyboard depending on the level.
    • Permit mistakes or not,  i.e. forcing the student to hit the backspace or not.
    • Show the key the user typed on the keyboard or not.  Could be distracting.
    • Show where the key is on the keyboard when the student makes a mistake.
    • Sound on/off.
Grabbing text from Wikipedia isn't that difficult and I'm contemplating using text from there for the advanced lessons.  My first thought was to use text from Project Gutenberg, but I found it difficult to find useful text there in other languages. Also, it's too easy to grab possibly inappropriate text, and the text in Gutenberg is all old, and may contain language that isn't in common use today.  Wikipedia is modern, safe, clean, interesting and has article standards.

I'm also planning to grab Wikipedia text to get some rough bi-gram and trigram frequencies for each language for 'random' text. It won't be perfect, but who needs perfect?

Last night I decided that I'll create the image for the keyboard on the fly.  They keyboard shown above was created with my Inkscape plugin. The original idea was to use this only as a starting point and then to pretty up the graphics afterwards.  I realized, however, that always building the keyboard on the fly gives me more flexibility for the keyboard layout (ex. international keyboards). It also will be easier to highlight better what keys you are learning, what keys you've already been taught and what keys have yet to be taught.
    You'll find the code at key-train, but it's not quite usable yet, I still have some work ahead of me!


    Anonymous said…
    Some time ago, I looked a lot at all the free (not necessarily open-source) typing software and found that the best one by far is webapp You should take a loot at it.
    Scott Kirkwood said…
    Thanks for the tip, it looks attractive. However:
    * The text is rather boring.
    * The hands are off to the side
    * It's not obvious that you don't have to log in. I think it should be more obviously an opt in.
    * You need to use the space bar early in the lessons.
    * You need to use the backspace to correct errors in the first lesson.
    * The speed drill uses "The Quick Brown Fox"?
    * It doesn't support other languages
    * It doesn't support other keyboards.
    Chris Leary said…
    Making new lessons easy to create would also be a very nice feature. I used an old version of KTouch to learn dvorak and remember having to generate a somewhat unpleasant XML file to describe a lesson for common programming constructs (i.e. "#include " and "Foo::bar()").

    Sounds like a great feature set -- best of luck!
    Chris Leary said…
    (Whoops -- ate my brackets on the include. Just pretend there's a <iostream> in there. ;-)
    alanhorkan said…
    I think learning to type is a matter of basic literacy. You wouldn't expect to use a car without learning the controls and most people appreciate the value of lessons.

    Your project is written in Python and PyGTK so might make it a good fit for Sugar/OLPC, I can almost imagine it sitting comfortably in the activity area. If you keep a little bit of model view controller seperation you may well come up with a program that Sugar, XFCE, and Gnome users could all love.

    With projects like these I've always wondered if it might be possible to shortcut development by reusing an existing onscreen keyboard. For example the Meego screen keyboard is quite nice, all SVG.

    Looks like a fun project.

    Popular posts from this blog

    Seven Segment Display in Inkscape

    Shortest Sudoku solver in Python