weegie home page


weegie is a driver that allows a gamepad with dual joysticks to be used in place of keyboard and mouse for input under X11.

The basic idea for keyboard entry is that you can use gestures beginning and ending with the stick in the center position to encode different keystrokes. The interpretation of this keymap

   v     z          v     z           $     &                        
    h   y            h   y             "   ?             @   1       
 x   o s   j      x   o s   j       {   ' !   _           ` ^        
  g   i   l        g   i   l         (  TAB  *         %   0   2     
   c     r          c     r           [     +           <     /      
    a   e            a   e            BS   SP            9   3       
   f     n          f     n           ]     -           >     \      
  k   t   w        k   t   w         )  RET            8   6   4     
     u d              u d           }   , ;   =           ~          
    p   m            p   m             .   :             7   5       
   q     b          q     b           |     #                        
    
is as follows. The left two maps are for the left stick, unshifted and shifted, and the right two maps are for the right stick, also unshifted and shifted, respectively. To enter an 'i', the left stick is moved to the 12 o'clock position and then returned to center. To enter an 'e', it's moved to the 3 o'clock position and back, and so on for 't' and 'a'. To enter an 's', the left stick is moved to the 12 o'clock position, right to the 1 o'clock position, back to 12 and back to center. Likewise, for 'o', the stick moves to 12, to 11, back to 12, and back to center. For 'y', it's up to 12, clockwise around to 3, and in to center. For 'z', it's up to 12, clockwise around all the way to 6, and then in (up) to center. The shift, control, and alt modifiers are bound to gamepad buttons.

For mouse input, the left stick is used for gross movement and the right for fine. Various gamepad buttons are bound to mouse buttons as well as the above-mentioned modifiers, and other oft-used keys such as Page-Up/Page-Down and the arrow keys.

That's the basic gesture system that's there now, but of course input could be done in many different ways. I've had a little experience with it so far. It works, and learning the keymap isn't as awful as it looks (it's similar to learning Dvorak or Graffiti, I think). Mousing is about as fast as with my regular mouse. I've only managed to attain around 8 wpm, though, versus 40-60 wpm on a regular keyboard. I imagine it might be possible to double that with experience. That notwithstanding, I think it might very well be useful for someone with limited use of their fingers or that just needed a break from standard keyboarding.

One thing that might help some is a better keymap than the original one above. A good keymap will map the most common letters and digrams (two-letter combinations) onto the easier gestures. The original keymap is a half-baked attempt at this, just to get some experience.

weegie is a userspace driver implemented in Python, including an extension module to interface with the X11 libraries. The current code is in rough, pre-alpha shape; it's definitely "some assembly required". I'm making available in the hope that it might be useful to others and that others might take an interest in improving it. (It'll be good prior art if someone patents the alphabet again, too.)

Currently it depends on the Linux joystick interface (/dev/js0, etc) and the X XTEST interface (which probably most X servers include). It could probably be ported pretty easily to other platforms and to the Linux console.

weegie has been developed using Gravis' Eliminator AfterShock and Logitech's WingMan RumblePad, these being the two seemingly best cheap, commercially available input devices I've run across so far. They're usable, but they also both have noticeable drawbacks for use as input devices. Between the two, the AfterShock is overall more suitable, as its sticks move with equal force in any direction, whereas the RumblePad's are more tightly constrained to the horizontal and vertical axes. The RumblePad also has the problem that its base calibration state (which is all that's currently available under Linux) does not encode the whole range of stick movement. The AfterShock seems a little more poorly manufactured, unfortunately, especially with respect to reliable button contact.

You can grab the latest version of the weegie code from the weegie project page at SourceForge.

Mailing Lists

Please send bug reports, comments, and patches to weegie-discuss.

License

weegie is free software, and may be redistributed and used under the terms of the GNU Public License.

Related Material

This driver is partly inspired by Ken Perlin's Quikwriting driver. Poika Isokoski has also done some interesting stuff, particularly with the goal of writing simple input drivers that can be used with virtually any device. Scott MacKenzie is another source of good ideas.


Thanks to SourceForge for providing their über-cool hosting environment.
SourceForge Copyright 2001 Mike Coleman. This page has been visited 4,000+ times.