views:

64

answers:

1

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!

+1  A: 

I just came across this blog post from January 2008, which mentions it would be easy to write a key logger using the Accessibility API.

That functionality should be half of the basic functionality you need (the other half would be to inject the expanded text into the current application).

Maybe you could contact the blog author for further details.

sapporo