The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: MicronXD on December 01, 2007, 10:43:11 AM

Title: Keyboard State
Post by: MicronXD on December 01, 2007, 10:43:11 AM
MS Windows XP seems to have a seperate keyboard buffer for each process that checks for keys. The problem with that is, I need a way to capture keys and check the sequence even if the charactors type are going into notepad. I'm not sure the way I'm explaining it is completely clear, so I'll explain what it is I'm trying to do :P

I'm trying to make a small app that will open it's GUI when the user types [ctrl], [windows key], [alt], [space]... However, what was supposed to be a BIOS level interupt is caught by MS Windows, and blocks me from catching the keys when Windows's focus is on notepad or any other program.

I know it's possible, because its done in keyloggers, Launchy (awesome lil app you all should get), and a few other places. So any suggestions?
Title: Re: Keyboard State
Post by: ossama on December 01, 2007, 10:54:13 AM
this link may help you
http://www.masm32.com/board/index.php?topic=8221.0
Title: Re: Keyboard State
Post by: MichaelW on December 01, 2007, 12:06:16 PM
QuoteI'm trying to make a small app that will open it's GUI when the user types [ctrl], [windows key], [alt], [space]... However, what was supposed to be a BIOS level interupt is caught by MS Windows, and blocks me from catching the keys when Windows's focus is on notepad or any other program.

Why those particular keys, and what does this have to do with a BIOS-level interrupt?

Title: Re: Keyboard State
Post by: Tedd on December 01, 2007, 03:14:11 PM
Those keys do not generate normal keypress messages.
Luckily you don't need to do anything special - use GetAsyncKeyState or GetKeyState to check that each of the keys are down.
Title: Re: Keyboard State
Post by: MicronXD on December 02, 2007, 08:16:46 AM
Quote from: MichaelW on December 01, 2007, 12:06:16 PM
QuoteI'm trying to make a small app that will open it's GUI when the user types [ctrl], [windows key], [alt], [space]... However, what was supposed to be a BIOS level interupt is caught by MS Windows, and blocks me from catching the keys when Windows's focus is on notepad or any other program.

Why those particular keys, and what does this have to do with a BIOS-level interrupt?

Ur a mod? lol
Title: Re: Keyboard State
Post by: MicronXD on December 02, 2007, 08:19:55 AM
Quote from: Tedd on December 01, 2007, 03:14:11 PM
Those keys do not generate normal keypress messages.
Luckily you don't need to do anything special - use GetAsyncKeyState or GetKeyState to check that each of the keys are down.

Thx :D