I want to intercept everything being typed on a system-wide basis. For each word I want to compare it against a list and if a match is found, it'll replace the previous word with an alternate. The net effect is certain typo correction or abbreviation expansion. For example, if I type in (r) it changes the the circle-R for Registered Trademark, or USA could become United States of America and teh could become "the".

If some extreme cases, I would also like to say something like ..clever.. and once I hit space it'll remove the dots and then pop up the word in a window with a dictionary for the definition. Perhaps also with a theasaurus.

Where do I place my hook?

Posted on 2001-10-09 11:33:39 by _Shawn
I tried this once to create a program that allows you to insert accents like in word (ctrl+accent, symbol. example: ctrl + :, e would become ?).. The hook was no problem but you can't change the input with a hook.
However iirc you can give your hook a special return value to not allow the character to be processed. Maybe you could send a WM_CHAR to the currently focussed window then..

Posted on 2001-10-09 11:52:08 by Thomas
_Shawn: here you have a working program that hooks the keyboard, log all the keys and write them to a .txt file.
This source belongs to a guy called -alloces- and I didn't really test it but he says that the program does that ... :) So, hope it helps ...
By the way, you should place a hook to the Keyboard and here you can find an excellent tutorial about Hooks (more related with the Mouse) but you'll learn a lot with it ...
Iczelion Hooks Tutorial

Good Luck !!! :alright:

-MagicMac. :tongue:
Posted on 2001-10-09 20:27:28 by magicmac
Ok, here you have a sure fire working code, I made this one about 6 months ago, it's based on Iczelion Hooks Tutorial but I use the Keyboard here ....
Take the source :)
Posted on 2001-10-09 20:32:32 by magicmac
the one that magicmac mentioned (alloces) is actually me. you can download the source from my website: http://noperator.cjb.net

if you have any questions to the source, then e-mail me please. i found out, that it is not possible to change the input data, you have to use a vxd therefore.

Posted on 2001-10-10 07:48:14 by NOP-erator
So NOP, why do u use the other Nick ? Ah!! I know, when you meet a woman, you tell her that your name is NOP (yeah, you will do nothing), and after she get confidence with you ... you tell her ... Yeaaaahhh ... I'm the great alloces !! :) Be aware :)

Hehe :)

Thanks for your source.

-MagicMac. :)
Posted on 2001-10-10 08:12:37 by magicmac

Thanks, it works quite well... =)

Posted on 2001-10-10 12:31:21 by _Shawn