I am using this code to detect whether modifier keys are being held down in the KeyDown event of a text box.
private void txtShortcut_KeyDown(object sender,
use the ?: Operator
txtShortcut.Text = (e.Shift? "Shift ": "") + (e.Control? "Control ": "") + (e.Alt? "Alt ": "") + e.KeyCode.ToString());