Jump to content
RockWallaby

Detect CTRL or SHIFT Keys Being Held Down at Application Start.

Recommended Posts

Hi,

 

Is it possible to detect if the CTRL or SHIFT key is being held down when an application starts?

 

= Steve

Share this post


Link to post

Use GetAsyncKeyState instead of GetKeyState.

 

GetKeyState will get you the state of the keys when a message was last read from the Windows message queue. This may or may not correspond to the current keyboard state.

GetAsyncKeyState will get you the current state.

  • Like 1
  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×