I found a .c program that will listen and react to the KeyPress and KeyRelease events in the background and I guess I can make it work with a Perl daemon, but it seems so simple that I wish Perl/tk could handle it.
I really need it to work the way I described so that it can be used with a lot of different web based camera applications.