Keypress and Ctrl or Shift when starting a application

EsspeN
09-09-2003, 02:20 AM
Hey!

When people start my application I want to check if they are holding the CTRL button or SHIFT button down when they start my application.

If I can determine if they hold CTRL down, the application will do something else than if it wasent.

Can I do this with KEYPRESS?

Thanx!

phinds
09-09-2003, 05:41 AM
wintel machines do not actually capture a key POSITION, they always capture key ACTIONS. That is, the hardware does not see where a key IS, it sees where a key GOES. SO ... when any key is presses and when any key is released, a signal is sent to the processor. Since you are looking to capture something that happens before your program starts (the PRESSING of the key), I don't think you are going to be able to.

It is possible that the key state is available via an API call, so that's going to be your only hope.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum