Can I get the current keys being presses - not in an event

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

Is there anyway possible to get the current keys being pressed. For
this particular case, I can't do it in a key down event.

Like some sort of getCurrent for the keys type?

What I'm trying to do, is stall processing while the user has the
shift key pressed. So I want to do.

....
Do some stuff

While (shift is pressed)
'do nothing
end while

finish processing.
....

Any ideas will be greatly appreciated.
 
For your specific purpose, you can use the static Control.ModifierKeys
property. I don't know of an equivalent for non-modifier keys.

Tom Clement
Apptero, Inc.
 
For your specific purpose, you can use the static Control.ModifierKeys
property. I don't know of an equivalent for non-modifier keys.

there's a win32api function, GetKeyboardState. as far as I know there's no
..net equivalent of it.
Wiktor Zychla
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top