I have a from that has a text box and I’m trying to determine if Ctrl-R is pressed within this text box. I can detect the keys separately using:
private void CheckKeys(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if(e.KeyChar == (char)Keys.R)
{
// ...
}
if ((Control.ModifierKeys & Keys.Control) == Keys.Control)
{
// ...
}
}
How do I determine if they pressed at the same time?
If possible, change your event to
KeyDown/KeyUp, everything will be easier. (Note that this solution is not always applicable)