How can I determine in KeyDown
that CtrlUp was pressed.
private void listView1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Control && e.KeyCode == Keys.Up)
{
//do stuff
}
}
can't work, because never both keys are pressed exactly in the same second. You always to at first the Ctrl and then the other one...
You can check the modifiers of the KeyEventArgs like so:
private void listView1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Up && e.Modifiers == Keys.Control)
{
//do stuff
}
}