Showing posts with label fly. Show all posts
Showing posts with label fly. Show all posts

Saturday, January 28, 2012

Fly: chord memorization drill

I think the first thing I need to do is chord memorization. I'm finding that if the chord is displayed anywhere on the screen, I simply type the chord, without actually really thinking about the letter it represents - this is bad.

So what I can do is turn off the input chord display and letter highlighting; I keep the steno key display on because I'm still memorizing the key positions (although I have to admit I've nearly got them down after only about fifteen minutes' total practice). I can then re-enable input chord display when I get stuck, which at this point is essentially for any chord that's more than one letter, except Q = KW, which is easy.

The problem with this is I have to take my hands off the keyboard and click the mouse. It would be way better to hit a key combination and have a chord hint displayed for half a second, after which it would automatically disappear again. That shouldn't be too hard.

Friday, January 27, 2012

Fly on Windows working

Plover itself (which is embedded in Fly) uses a thread to listen for keyboard events. This is entirely appropriate for Plover, but not good for Pygame, so I disabled it; I think we're going to want to redesign Plover/Windows a bit to move that thread out where it won't bother us.

But this marks the day I start learning steno. Note: it's freaking hard. I might want to tweak Fly a little; I'm not sure I like its lesson setup - but I think that's doable.

Monday, January 23, 2012

Fly on Windows: debugging Pygame/SDL

I've been spending a little too much time mystified by Pygame's inexplicable refusal to see any SDL events under Windows. Today, I discovered an incompatibility with the central StoppableThread architecture of the application, so I think maybe I'm on the track to getting this thing running.

Do you have any idea how long it's been since I tried to debug somebody else's code? In a language I'm rusty with, and using libraries I've only read about? Makes me feel like a teenager again.

Anyway, I just wanted to count coup here on the blog.

Update: Indeed, here's a StackOverflow thread describing substantially the same problem under OSX. There, too, the code seemed fine under Linux, and no events fired on OSX. Moral of the story seems to be: don't put Pygame in a thread.

Update 2: I put all the commented-out code back and sure enough, the window gets its messages - and then if I enable Plover I see the same behavior. So it's going to be off into Ploverland to see what's going on there. Weirdness on all sides.

Wednesday, January 18, 2012

Fly on Windows

The first task I've undertaken is to get Fly working on Windows. As of this evening, I managed to get the graphical window to appear, but the application locks up as soon as a key is pressed.

To get anything working at all - some of these are used by Plover in general, and some just by Fly - these are the modules I needed to track down and install. (Yeah, I do miss CPAN when I leave the Perliverse.)
  • Pyhook is a module for hooking Windows events.
  • Pywin32 includes pythoncom (a COM library for Python)
  • pyserial
  • And of course Pygame.