Check whether a modifier key (Ctrl/Alt/Shift) is currently in a pressed state.

To check whether a modifier key is currently in a pressed state use the static function Control. ModifierKeys

Example:

if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift)
{
   ..
}

Leave a Reply

Your email address will not be published. Required fields are marked *