how to intercept under delphi2 characters hit to the keyboard

how to intercept under delphi2 characters hit to the keyboard but without
disrupting a word processor for example.
it would be to make a software spy that would work behind plane.
it is necessary that that can also turn under DOS. is this possible?

thank you for advance

van...@www.softel.fr