R
reasonman
I have a DataGridView that catches the KeyUp event. I use it to
capture a keyboard copy(ctrl-c) and then perform my own formatting on
the copied text. Everything works as it should when I release the 'C'
key first, but if I release 'ctrl' first while still holding 'C', it
doesn't trigger the event. Below is the code for the event. I'm
already handling it on a copy context menu item but I know i'll have
users using the keyboard shortcuts and I'd prefer to have everything
work as expected. Any ideas are appreciated.
private void dgOrders_KeyUp(object sender, KeyEventArgs e)
{
//trap a ctrl+c(copy) and call the copy method
if (e.KeyData == (Keys.C | Keys.Control))
CopyData();
}
capture a keyboard copy(ctrl-c) and then perform my own formatting on
the copied text. Everything works as it should when I release the 'C'
key first, but if I release 'ctrl' first while still holding 'C', it
doesn't trigger the event. Below is the code for the event. I'm
already handling it on a copy context menu item but I know i'll have
users using the keyboard shortcuts and I'd prefer to have everything
work as expected. Any ideas are appreciated.
private void dgOrders_KeyUp(object sender, KeyEventArgs e)
{
//trap a ctrl+c(copy) and call the copy method
if (e.KeyData == (Keys.C | Keys.Control))
CopyData();
}