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,
You can check the Control.ModifierKeys - because that is an enum it should be more human friendly. Alternatively, just
Control.ModifierKeys
string s = (e.Shift ? "[Shift]+" : "") + (e.Control ? "[Ctrl]+" : "") + (e.Alt ? "[Alt]+" : "") + e.KeyCode;