Quick and dirty hack:
Getting a USB PIC to emulate a keyboard is easy-peasy- MicroChip have a project
up on their website that does just that, using minimal parts, and it's in assembler, so it's easy to build and program onto a micro. Changing the output from it is not too tough either- I've played with it some, and changing it to output a character or string of characters on a button press is very easy.
Next, throw in AutoHotKey
. This is an INSANELY powerful macroing program. It can launch multiple applications and track and send commands to each individual one without bringing them to the foreground. It can do some basic machine vision on the monitor- I used it at one point to trigger a logic analyzer when an image coming out of a camera changed. It's REALLY amazing.
Assign some weirdo keystroke (say, CTRL+ALT+SHIFT+F1) to the action you want to take on the PC through AutoHotKey, then set up the micro to do it. It becomes even easier if the application can run in the foreground- AutoHotKey is very capable of x,y coordinate mouse clicks and menu navigation, so even if the app doesn't have a keystroke shortcut (or series of keystrokes) for what you want to do, you can still work it.