Is there an easy way to capture a ctrl+key1, key2 event in a winforms app similar to that in visual studio such as ctrl+e, c = comment out selected lines?
I am currently overriding my forms OnKeyDown event:
protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
if (e.Control && e.KeyCode.ToString() == "N")
{
//do something...
}
}
The article in the comment may have been for WPF but the idea in it can still be used
Construct a class such as
but ignore the inheritance.
to use it