C #: In the keydown event of a text field, how do you detect currently pressed modifiers + keys?
I did the following, but I'm not very familiar with these operators, so I'm not sure what and what I'm doing wrong.
private void txtShortcut_KeyDown(object sender, KeyEventArgs e)
{
if (e.Modifiers == (Keys.Alt || Keys.Control || Keys.Shift))
{
lbLogger.Items.Add(e.Modifiers.ToString() + " + " +
"show non-modifier key being pressed here");
}
}
1) How to check if e contains modifier keys?
Mike power
source
share