Like the subject says I have a listview, and I wanted to add the Ctrl + A select all shortcut to it. My first problem is that I can\'t figure out how
private void listView1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == (Keys.A | Keys.Control)) foreach (ListViewItem item in listView1.Items) item.Selected = true; }
To only do it on Ctrl+A, not on other combinations like Ctrl+Shift+A etc.