OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 23, 2024 12:50 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: keyboard hook
PostPosted: Mon Jan 20, 2003 3:03 am 
Hi!
I need a program which is able to read any scancode from a keyboard. (Win98)
The problem: I'll have to read ANY scancode, even scancodes that are not known by Windows.
But: Windows changes all not known scancodes into any other.
If I read direktly from the keyboard port (asm) so I'll get the allready changed codes.

So I need a keyboad hook that can read ALL scancodes (0..255)

Can anybody help me?

Greets, Schubi


Top
  
 
 Post subject: Re:keyboard hook
PostPosted: Mon Jan 20, 2003 2:56 pm 
Hi I think this cide can be used to do very malicious attack as keylogger, in fact I have implemented a win32 program that used both hooking and nonhooking for keylogging but I never used it for malicious attack, anyway... This OS work had took me away from win32 for about half a year and I cannot remember it exactly. But its very very easy... (as far as I remember)


Top
  
 
 Post subject: Re:keyboard hook
PostPosted: Mon Jan 20, 2003 3:08 pm 
Schubi wrote:
So I need a keyboad hook that can read ALL scancodes (0..255)

You can't do this unless you put a hook above the keyboard driver. Although scan codes are available to Win32 (and therefore to keyboard hooks), you'll only find out about a key if the keyboard driver recognises it.

What key do you want to look for? Assuming the keyboard driver is correct, there won't be any scan codes that Windows doesn't recognise.


Top
  
 
 Post subject: Re:keyboard hook
PostPosted: Tue Jan 21, 2003 12:47 am 
I have to write a software which could test all keyboards
including customer specific. I have a sample here with 128 Keys with 2 states, so it can send all 256 make and break codes.
but windows just let this scancodes pass the driver which have a funktion on a default 102/105 keyboard.
thats the reason why all multimedia keyboards need a several driver to can be run.would windows let pass the codes you just need a simple program to operate these keys.
well, very simple, may be. but how can I solve the problem?
my programming skills are just fine i think, but with dlls and drivers I have absolutely none experience...

please help me, and excuse my bad english ;-)


Top
  
 
 Post subject: Re:keyboard hook
PostPosted: Tue Jan 21, 2003 7:11 pm 
As I said, "You can't do this unless you put a hook above the keyboard driver". It is up to the keyboard driver to pass key presses down to the GUI; if the keyboard driver doesn't recognise a key then it doesn't get noticed.

You might have some luck from the Windows Driver Development Kit (http://www.microsoft.com/ddk/).


Top
  
 
 Post subject: Re:keyboard hook
PostPosted: Wed Jan 22, 2003 7:11 am 
thats the next problem.
I have no ms visual c++ and i cant use it at work.
I work with borland delphi / c++ builder.
I would need a ddk for borland products.
Can you tell me if such a packet exists?


Top
  
 
 Post subject: Re:keyboard hook
PostPosted: Wed Jan 22, 2003 5:44 pm 
I doubt it. The only DDK distribution I know of is the Microsoft one.

In short: you're on your own.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 63 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group