Link to home
Start Free TrialLog in
Avatar of jimsweb
jimswebFlag for India

asked on

Keyboard hook without DLL

Can anybody help me to create a keyboard hook in delphi without using DLLs?
I would appreciate if someone can provide some WORKING samples..

- Other method would also help me if keyboard hook is not practical without using a dll.
- I need to get all the key presses even if my application is not in focus. That's is the main requirement.
- I need to limit the whole application to a single exe.
Avatar of Mike McCracken
Mike McCracken

What is the purpose of this program?

Why do you want to capture all keypresses even those unrelated to your program?

mlmcc
Avatar of jimsweb

ASKER

;-)
thanks for ur comments.
Definitely not for a keylogger.
I work with mainframes and involves mostly console windows. so i am planning to automate snd popup some windows as user types on the console window. hope this helps.
There are some 3270 emulators written in Delphi.  One of my RTP-DIG members wrote one back in the 90s.  There are third party 3270 emulators that might provide hooks for the user events you need to trap.
Avatar of jimsweb

ASKER

I have worked on tn3270 and IBM's pcom etc. None of these are having this hook feture AFAIK.
Moreover i'm planning for an ' intelliscense' type popus over the cosole window. so, somehow i need to find out a good hookup mechanism. thanks for ur comments.
SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jimsweb

ASKER

Thanks a lot.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Welcome (back), nzkiwi100.
Avatar of jimsweb

ASKER

Thanks everyone.
@ nzkiwi100
It is highly appreciated if you could put the same on an article in the article section.