How can I determine in KeyDown that CtrlUp was pressed.
private void listView1_KeyDown(object sender, KeyEventArgs e)
{
private void listView1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Up && Keyboard.IsKeyDown(Key.LeftCtrl))
{
//do stuff
}
}
This code will work only if you press first LeftCtrl, then "UP". If order has no importance, I recommend that one :
if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))&& Keyboard.IsKeyDown(Key.Z))
{
//do stuff
}
In that case, both Ctrl are taken in account, and no importance about the order.