How to change the input from keyboard before it has been processed by the target window?

Thanx for any kind of help...
Regards,
Shail2k4