Home > Keyboards, Software Release > Typing Program on GitHub!

Typing Program on GitHub!

I uploaded the typing program to GitHub. I will no longer be updating the version at http://mtgap.bilfo.com/Typing.zip

From now on, the latest version of the typing program will be available at: https://github.com/MTGandP/Typing

Advertisements
  1. Paul
    February 15, 2012 at 6:09 am

    Hello.

    You do so much interesting research in keyboards that I could think of no better person to ask. What do you think of this keymap?

    https://docs.google.com/drawings/d/1q2CPSCj0YS-5wYdBkD1dltkr9yolkxR7n_W_Fq9eAog/edit

    https://docs.google.com/drawings/d/1vhy6Yury_NGpDy0AXnB3KXKPYTfsar8mLOs4Ldl7eXI/edit

    The layouts are pretty much to preference. The dvoraky one is what I’ve been using for about 3 months. The rlc, yp, and iu swaps (how I started learning) was because of one of your posts 😛 The f and / because I hate reaching for that top middle key.

    I was aiming to simplify the map. I removed a lot of keys that I think no one uses any more. The non-mod keys that have been removed that turn out to be still useful would just go on the fourth mod level. Along the top would be esc and f1 along 12.
    I might put them in later.

    Look forward to hearing your opinion 🙂

    • February 15, 2012 at 2:26 pm

      The changes you make to Dvorak look good. The placement of f may overload the right pinky—if it works for you, that’s fine, but I’d rather not put so much load there.

      I think the biggest two problems with that layout are the low frequency of inward rolls and poor placement of period and comma (they don’t deserve such good spots). There are a number of little problems with Dvorak, but your mod fixes most of the big stuff.

      I like the placement of Backspace, and I think AltGr gets too prime a spot. All the AltGr keys are pretty rare—rarer than shifted keys—so I would swap AltGr with one of the Shifts and then press Shift with the thumb.

      I notice you’ve divided the spacebar into two separate keys. While you’re modifying the physical layout, why not go all the way and make the keyboard symmetric?

      You remove a lot of keys and place them under AltGr. I tried something like this once and found that it was more comfortable, but a lot slower. I’d recommend leaving all the keys on the keyboard because you can probably type faster that way.

  2. Paul
    February 15, 2012 at 6:34 am

    Added the rest of the keys and one of the links has changed to, https://docs.google.com/drawings/d/1ZwrZAeL8G2KKo2JHxefsrWGU9RN9rc87mIvxN6vreDo/edit

    • bogboar
      February 15, 2012 at 6:16 pm

      If your aim is to reduce strain on the right pinky: C isn’t much less common than L. C is 70-75% as common as L. I also don’t quite understand why you swap P and Y.

      One tip: you could swap A and O. “oa” is more common than “ao”, e.g. boar.

      Have you looked into what Capewell did on Dvorak? http://www.michaelcapewell.com/projects/keyboard/layout_capewell-dvorak.htm

      • February 15, 2012 at 7:21 pm

        Capewell made a good deal more changes than I did, and I designed my version of Dvorak a while ago. I’d recommend using either Colemak or one of my layouts I’ve created recently.

        If I run m program’s improver on Dvorak, I get this:

         =  1  2  3  4  5   6  7  8  9  0  q  z   
           .  u  ,  g  "   x  n  d  c  w  (  )  /
           o  e  a  i  y   m  h  t  s  r  k     
           _  '  -  p  ;   v  l  b  f  j  
        
      • Paul
        February 17, 2012 at 7:10 am

        I don’t actually use my right pinky for the c on my layout, it’s just to awkward. Hence why it wasn’t much of a challenge to put the f where it is. The Capewell-Dvorak layout looks interesting and for the most part I can agree on the problems with Dvorak that highlights. The only thing I don’t like about it is his priority of copy and paste.
        I might try it out. Has anyone used it?

        The map I posted was meant to ask for an opinion on the layout of the keys rather than the characters on the keys.

        I also had an idea about a genetic algorithm but I don’t think I will have enough time to do it. Instead of scoring key presses on specific types of movements and character placement, rate how easy it is to move to any key from any key. I did do this for every pair. I think it will make an unfamiliar mapping but an insanely comfortable one. It wouldn’t take triples in to account as much as the doubles.

        • February 17, 2012 at 3:33 pm

          The map I posted was meant to ask for an opinion on the layout of the keys rather than the characters on the keys.

          I’m not sure what you mean here. Do you mean you want feedback on the physical locations of the keys?

          Where do you put your fingers on this keyboard?

  3. March 28, 2012 at 5:01 pm

    when running make,

    gcc -o optimizer accessories.c algorithm.c cjalgorithm.c costs.c fitness.c keyboard.c main.c tools.c trifitness.c trikeys.c values.c
    /tmp/cc98VYRO.o: In function `isLegalSwap’:
    keyboard.c:(.text+0x1d10): undefined reference to `isnumber’
    keyboard.c:(.text+0x1d4e): undefined reference to `isnumber’
    keyboard.c:(.text+0x1da5): undefined reference to `isnumber’
    keyboard.c:(.text+0x1de1): undefined reference to `isnumber’
    collect2: ld returned 1 exit status
    make: *** [optimizer] Error 1

    I tried using gcc-4.6.3-1 and 4.7.

  4. March 28, 2012 at 5:21 pm

    I can fix that by changing isnumber to isdigit.
    I still get ‘Segmentation fault’ when running ./optimizer though.

    • March 29, 2012 at 12:48 pm

      I just uploaded a slightly-modified version to GitHub. It runs fine for me (on gcc-4.2.1). If it still doesn’t work, let me know and I’ll see what I can do.

  5. March 29, 2012 at 3:27 pm

    The last commit was one month ago.

  6. sasuley
    April 3, 2012 at 6:40 pm

    keyboard.c: In function ‘initKeyboard’:
    keyboard.c:138:6: error: ‘keepTab’ undeclared (first use in this function)
    keyboard.c:138:6: note: each undeclared identifier is reported only once for each function it appears in
    keyboard.c:146:29: error: ‘fullKeyboard’ undeclared (first use in this function)
    keyboard.c: In function ‘printLayoutRaw’:
    keyboard.c:418:7: error: ‘fullKeyboard’ undeclared (first use in this function)
    keyboard.c: At top level:
    keyboard.c:542:5: error: conflicting types for ‘charToPrintable’
    keyboard.c:543:1: note: an argument type that has a default promotion can’t match an empty parameter name list declaration
    keyboard.c:416:3: note: previous implicit declaration of ‘charToPrintable’ was here
    keyboard.c: In function ‘charToPrintable’:
    keyboard.c:546:16: error: ‘ASCII_SHIFT’ undeclared (first use in this function)
    keyboard.c: In function ‘isLegalSwap’:
    keyboard.c:578:6: error: ‘keepTab’ undeclared (first use in this function)
    keyboard.c:584:6: error: ‘fullKeyboard’ undeclared (first use in this function)
    make: *** [optimizer] Error 1

    • April 10, 2012 at 1:18 pm

      I uploaded a new version to GitHub. Some of the files that were up there were out of date. It should work now.

  7. sasuley
    April 10, 2012 at 11:52 pm

    I still get a segmentation fault.

    It might be easier if you run it with this:
    } else if (fullKeyboard == FK_STANDARD) {

    int64_t costsCopy[KSIZE_MAX] = {
    110, 100, 90, 75, 100, 120, 160, 100, 75, 90, 100, 110, 120, 999,
    999, 88, 10, 10, 55, 70, 90, 30, 10, 10, 55, 90, 90, 140,
    999, 10, 0, 0, 0, 30, 30, 0, 0, 0, 10, 50, 999, 999,
    999, 90, 90, 70, 45, 95, 60, 53, 70, 70, 70, 999, 999, 999,
    };

    I just don’t think that the standard values represented my hands. I would be really grateful if you ran the program and replied with the layout (Vowels on left, no zxcv lock).

    • April 12, 2012 at 1:08 am

      Do you get a segmentation fault as soon as you run the program?

      Open the directory where you keep the typing program, run make, and type “gdb”. Once the prompt opens, type “run optimizer” and tell me what you get. That will give me more information as to what’s going on.

      The left-hand vowel thing isn’t fully functional. I’ll work on it and get back to you. Here’s the optimized result with the cost layout you gave:

      Hands: 48% 51% Fingers: 8.0% 7.0% 19% 15% 0.00% 0.00% 17% 14% 12% 8.0%

      # Q Z % P O U = + D N M K J X ` A H E I : C S R T L W | ? & Y @ F G B * V

      / 1 2 3 4 5 6 7 8 9 0 q z – p o u . ” d n m k j x ! a h e i , c s r t l w ; ( ‘ y _ f g b ) v

      Fitness: 17262205 Distance: 32529 Finger work: 0 Inward rolls: 6.21% Outward rolls: 2.13% Same hand: 29.92% Same finger: 1.83% Row change: 12.55% Home jump: 2.17% Ring jump: 1.95% To center: 3.74% To outside: 0.68%

      (It put the vowels on the left purely by coincidence.)

      I notice that this layout moves quite a bit of work off the home keys and onto the upper row. Do you prefer it this way?

  8. sasuley
    April 12, 2012 at 7:31 pm

    Yes, I get the fault as soon as I run the program. This is what I get with gdb:
    Program received signal SIGSEGV, Segmentation fault.
    0x00007ffff7aab4c1 in getc () from /lib/libc.so.6
    I use archlinux 64 bit.

    From layouts I find that I really can not hit the bottom row accurately and the top row feels almost as good as the home row. Might have something to do with my finger length. I am going to try it out and I will see how it compares to the inea,dshtr layout.

    • April 12, 2012 at 8:15 pm

      I think there’s a problem with the file names. Rename “layoutstore.txt” to “layoutStore.txt” (notice the capitalization), “fulllayoutstore.txt” to “fullLayoutStore.txt”, and “kinesislayoutstore.txt” to “kinesisLayoutStore.txt”. I changed the names to fit the syntax convention I’m using, but GitHub’s files still have the original names for some reason.

      If that doesn’t work, enter gdb, type “run optimizer”, and then type “backtrace”. Tell me what you get for both.

  9. sasuley
    April 15, 2012 at 12:37 pm

    Did not change anything. I should point out that when making, I get this error:

    /tmp/ccwZ7tw3.o: In function `printPercentages’:
    keyboard.c:(.text+0x16e7): undefined reference to `lround’
    collect2: error: ld returned 1 exit status
    make: *** [optimizer] Error 1

    I temporarily removed the part of code that involved lround since it was just for printing stats and it worked. So if I make without doing that I get the error up there, and if I get passed that error, I still get a segmentation fault with the new file names.

    Running backtrace gives me:

    #0 0x00007ffff7aab4c1 in getc () from /lib/libc.so.6
    #1 0x000000000040d5b2 in initTypingData ()
    #2 0x000000000040abcb in initData ()
    #3 0x000000000040f178 in setksize ()
    #4 0x000000000040a399 in main ()

    • April 15, 2012 at 2:02 pm

      Also change alldigraphs.txt to allDigraphs.txt and allchars.txt to allChars.txt (this problem should be fixed in the next commit).

  10. sasuley
    April 15, 2012 at 5:59 pm

    That fixes the segmentation fault but the other ‘undefined reference to `lround” persists.

    • April 15, 2012 at 9:29 pm

      The header file was missing. I added it to values.h. Download values.h and it should work.

  11. sasuley
    April 16, 2012 at 1:05 pm

    Same error:

    /tmp/cc3o335S.o: In function `printPercentages’:
    keyboard.c:(.text+0x16e7): undefined reference to `lround’
    collect2: error: ld returned 1 exit status
    make: *** [optimizer] Error 1

    • April 16, 2012 at 2:50 pm

      Do you know if the lround function exists in your math.h file? If it does, I don’t know what the problem is.

  12. sasuley
    April 16, 2012 at 3:47 pm

    It might be an Arch specific thing but in the MakeFile the line needs to be:
    gcc -o optimizer accessories.c algorithm.c cjalgorithm.c costs.c fitness.c keyboard.c main.c tools.c trifitness.c trikeys.c values.c -lm

    Just in case someone else has this problem!

  13. sasuley
    April 16, 2012 at 4:02 pm

    This is what happens when I run algorithm: http://pastebin.com/JDFWBQJ5
    and this is what running in valgrind outputs: http://pastebin.com/ngRSRGW1

    • April 16, 2012 at 4:30 pm

      I can’t do much with that error output. Try running it with gdb and get the backtrace.

    • April 21, 2012 at 6:22 pm

      I think there’s some problem with how it’s reading files. It opens the file of source layouts and reads them in, but when it closes that file, the program crashes. This doesn’t happen on my machine. It may be happening because of how you renamed files. Try downloading the source code from scratch. (I changed the makefile so it uses -lm by default.)

  14. sasuley
    April 16, 2012 at 4:36 pm

    (gdb) backtrace
    #0 0x00007ffff7779c35 in raise () from /lib/libc.so.6
    #1 0x00007ffff777b0b8 in abort () from /lib/libc.so.6
    #2 0x00007ffff77b7e5b in __libc_message () from /lib/libc.so.6
    #3 0x00007ffff77bda56 in malloc_printerr () from /lib/libc.so.6
    #4 0x00007ffff77ae3dd in fclose@@GLIBC_2.2.5 () from /lib/libc.so.6
    #5 0x0000000000403e4b in ?? ()
    #6 0x00007ffff7752a10 in ?? () from /lib/libc.so.6
    #7 0x00000000004235e2 in ?? ()
    #8 0x0000000000000000 in ?? ()

  15. sasuley
    April 19, 2012 at 10:37 am

    For some reason it works in valgrind. The best I have managed to get so far is this:

    : 1 2 3 4 5 6 7 8 9 0 q z
    . p o u ( ) b l c ” x j $
    i n e a , m h t s r k
    ; – ‘ y _ d f v g w

    { } % / [ # ^ ] * + ` Q Z
    X J ~
    I N E A = M H T S R K
    @ ? ! Y | D F V G W

    It seems suspiciously like your Kinesis layout.

    Fitness: 16096942
    Distance: 26231
    Finger work: 135978
    Inward rolls: 9.77%
    Outward rolls: 2.55%
    Same hand: 34.35%
    Same finger: 1.99%
    Row change: 13.19%
    Home jump: 1.41%
    Ring jump: 2.65%
    To center: 2.68%
    To outside: 0.78%

    The fitness is not directly comparable because they key cost has been changed and I am not sure how to test the score of a layout from file.

    This is the cost array:

    110, 100, 90, 75, 100, 120, 160, 100, 75, 90, 100, 110, 120, 999,
    999, 55, 20, 18, 45, 70, 90, 45, 18, 20, 50, 70, 90, 140,
    999, 5, 0, 0, 0, 35, 35, 0, 0, 0, 5, 50, 999, 999,
    999, 110, 80, 70, 35, 95, 30, 40, 60, 55, 35, 999, 999, 999,

    • April 19, 2012 at 12:52 pm

      Hi,

      I haven’t had time to investigate the problem you’re having. I’ll get to it as soon as I can. In the meantime, I’m glad you got it to work in valgrind.

      I think that layout looks so similar because the costs for each position are pretty similar to the ones I use.

      To compare layouts in a file, type “compare “. To see what other commands are available, type “help”.

  16. evelyn
    May 17, 2013 at 12:25 am

    I tried to make this and got an error:

    $ make
    gcc -std=c99 -Wno-unused-result -O3 -c -o accessories.o accessories.c
    cc1: error: unrecognized command line option “-Wno-unused-result”
    make: *** [accessories.o] Error 1

    Using gcc 4.2.1 on OSX Mountain lion.
    What can i do?

    • May 17, 2013 at 1:13 am

      Open Makefile and remove where it says -Wno-unused-result. It should say it near the top, on the CFLAGS line.

      • evelyn
        May 17, 2013 at 2:55 pm

        It worked, playing with it now.

  17. evelyn
    May 21, 2013 at 6:49 am

    Reporting after playing with TypingMaster a while:

    – Running the algorithm gave me “fatal exception 8”, the solution was to remove all backstrokes from my custom frequency lists [I didn’t mind, don’t care about backstroke]

    – Removing the penalty [zero] for something like “tocenter” or “outroll”, gives 0.00% frequency for those stats

    – I wish hand warp and hand smooth stats were included in the stats output 🙂

    • May 21, 2013 at 4:55 pm

      Can you submit an issue report on GitHub and provide a little more detail? If you do that, I’ll try to fix them when I get a chance.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: