I want to create something similar to TextExpander - a macro program that watches the keyboard for a certain combination of keystrokes, and then replaces the text you just entered with a snippet. What I mean is, you type "--expando" and it replaces it with "gee isn't this an expanded text snippet". I know you need to hook into the assistive services API but I just can't seem to find any simple source code from which to jump off, and all the documents I can find are about making existing apps accessible, rather than creating the assistance tools themselves.
Pointers to source code would be most welcome, but just a link to the requisite API docs would be a good start!