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
 
Back
Top