New Keyboard Layout Analyzer, Less Lines of Code

I’ve uploaded a new version of my Keyboard Layout Analyzer. You can see a full screen capture of the output page below. The new version has a layout similar to the one I discussed in my last post, and has a different chart set up, as well as a hand full of other small new features.

The New Layout For Keyboard Layout Analyzer Output

The New Layout For Keyboard Layout Analyzer Output

This new version is essentially a complete re-write of the old version. I had been making mental notes of features I thought would make the program a lot more useful, and after thinking about how I’d implement these new features, I realized I’d be better off just re-writing the application instead of modifying the old one.

This re-write was also a way for me to “pay down” my “technical debt” (I think I like that term), as I was able to more efficiently implement certain things to make them a lot more flexible. When I write stuff for fun, a lot of the time I just go with the first or second implementation I think of and then get to work. This re-write will probably serve as a good lesson learned, since the re-write was a little more painful than I expected. Only one of the new features that I thought up is in the program right now (the new chart set up), I didn’t have time to get to the rest of them, though I hope to implement them in the next couple of weeks.

Here’s an overview of what’s in this version:

  • Updated interface.
  • Able to view charts of different layouts all at once.
  • Able to select what pieces of information you want to factor into the charts.
  • Addition of the Capewell and Arensito (Simplified) layouts. However, this set up isn’t final. These layouts will still be in the next version, but the options will be a little different.
  • “Personal Layout” factored into the statistics.
  • A layout recommendation is made based on what you typed.

This new implementation also consists of 26% fewer lines of code. 🙂

This new version was tested out in Firefox 3.0 and 3.5, Chrome, and IE8. Unfortunately, the new IE8 messed up my install of IE6Eolas, so I’m not sure how the app works in IE6 or IE7. Oh, and I hate to rehash the cliché of bashing IE, but IE8 is actually a lot slower than IE6 and IE7 when it comes to executing JavaScript. Enough so that I was actually a little dismayed. I had been hearing mostly positive things about IE8, but I just didn’t see anything that I thought was that impressive.

Anyway, if you have any suggestions for the Keyboard Layout Analyzer or find any bugs in it let me know.

18 thoughts on “New Keyboard Layout Analyzer, Less Lines of Code”

  1. I got the same thing for a couple different pieces of text I tried, though I can get the other layouts if I type something I know will favor them. It’s kind of interesting that Colemak seems to come out the best most of the time. I think I may have put too much importance in what the index and middle fingers type, so I may tweak things in the next version. However, it may be that Colemak is just the best layout of the 5 presented.

  2. Would be nice to see the neo 2.0 keyboard layout here. This is the best alternative for typing of German texts and also very nice for programming.

  3. Hrm, I hadn’t heard of that one. I’ll look into it though. It appears the punctuation characters for the layout don’t match up with the standard keyboard layouts (ex: @ and 2 don’t go together). Though I could easily plug that into my calculation code, it would screw up the graphics I’m using. I’d either have to generate the images on the fly or have a set just for that layout, and I’m not very good at graphic design. I’d have to think a while for how I’d do it properly.

  4. I can imagine there’s quite a lot of programming necessary for neo 2.0 has a lot of modifiers (shift, ctrl, Mod 3 (shift lock key) etc.). I’m not absolutely sure but 6 have been almost completely defined and 8 are planned. So you can type math symbols, Greek, Cyrillic and a lot of other letters (German ones, like small and capital ß (sharp s) etc.)
    The first three modifiers would suffice for writing standard texts, I think.

    Neo is already included in the German standard keyboard layouts of Linux.

    More infos at:

    http://en.wikipedia.org/wiki/Keyboard_layout#Neo

    http://www.neo-layout.org/ (unfortunately in German, for obvious reasons)

    1. Well I went to that site but I found out you already can use cyrillic letters and other unicode symbols on this website, have to click the keys in the analyzer and change the primary and shift keys, I didn’t see any benefit in that website, unless for Germans.

  5. Looks like my custom ZBULP layout beat them all, including Colemak & the generated “optimal” layout for my given corpus, which was just a couple of ebooks.

    zbulpkmyfj[]\
    riaohdtens’
    ;xcvqgw,./

    Now to throw some source code at it…

  6. Thank you for your time and effort in coding this analyzer.

    I want to know whether you have calculated the horizontal movement travel.

    In Qwerty, I mean when you type G or H? These keys in the home row, yet it takes time and index finger travel to reach them. But less distant than top or bottom row, of course.

    And to move up to upper row is easier than bottom row, so you should have a more key distance on bottom row too, in comparison with the upper row.

  7. Tony – Yes, horizontal movement is factored in. The distance is based on your fingers’ home row positions, unless you’re using the same finger that you used previously (for example – if you’re typing T and just typed R, the distance calculated will be from R to T. If the next move you make doesn’t include the index finger, that finger returns to its home row position).

  8. Neo2 always wins – even in English texts — although it’s primarily made for German.

    Original Neo2 layout (the small o’s are only placeholders for the diacritical marks:

    ô123456 7890-ò
    xvlcw khgfqßó
    uiaeo snrtdy
    üöäpz bm,.j

    Shift (mod 2):

    ?°§?»«$ €„“”—?
    XVLCW KHGFQ?õ
    UIAEO SNRTDY
    ÜÖÄPZ BM–•J

    Mod 3 (caps lock)

    ¹²³›‹¢ ¥‚‘’
    …_[]^ !=&?ø
    \/{}* ?()-:@
    #$|~` +%”‘;

    Mod 4 ()

    contains a numeric block and wasd like cursor controls, tabs etc.

    Try this approximation out, it works for text without special characters, unfortunately you can’t add more layers that you would need for a true Neo2 layout, at least for the Shifted characters:

    0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,43,45,37,44,16,36,34,33,15,32,25,26,27,28,21,22,29,17,23,30,47,18,19,31,20,40,41,51,38,39,24,42,46,48,49,50,35,52,53,54,55,56,57,58,59,60

  9. I love your analyser. Love it!
    I’ve been tweaking keyboard development for years and wish I had found this sight before.

    Two quick suggestions for the next iteration:
    1) Please, pretty please, allow shift states to be user defined (i.e. delink the characters on a key). Current shift states on all of the standard keyboards you offer are not optimal. Classic errors include (1) / on the same key as ?, with / unshifted and ? shifted, and (2) a dedicated key for ‘; :’.
    You mention this above in comment 4, and I think it would be well worth it.

    2) This is a bit trickier, but allowing the user to state where the hand is placed on the keyboard would also be a huge plus. In your bio you talk about Dvorak overworking your right pinky. Moving your entire right hand one key to the right reduces the strain on the right pinky from having to support 13 keys (7 of which are relatively high use) to having to support only 9. The index fingers can pick up two each of the middle keys, and the index fingers can handle it :).

    Anyway, those are my two cents. Thanks for your great work.

  10. hi Fireandmirth – You’re right about #1. A lot of foreign keyboards also have different shift set ups, which is something I didn’t consider when I first wrote the app. When I get the time, I’ll probably set it up to make it much more configurable this way. #2 is an interesting idea, and something I’ll consider. For my Typing Speed Test, I made the keys users pressed with each finger configurable, which is something I’ve always meant to go back and add into this app – though I didn’t think about the starting position.

    Anyway, these are both great ideas. Thank you for the compliments and I’m glad you liked the app :).

  11. albedo – Thanks for the information on the Neo2 layout. I tried a few pieces of sample text but I didn’t see the Neo2 outperforming the other layouts (though I only used English text).

Comments are closed.