remove predefine shortcut key
how can i remove predefine shortcut keys of keyboard by C# coding in wpf
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted May 27, 2011, 3:02 AM
If the Combination of Ctrl+A is pressed then just do return or do your own logic.
krishna kumar dubeyPosted May 27, 2011, 2:22 AM
Sam HobbsPosted May 26, 2011, 6:16 PM
Posted May 26, 2011, 10:51 AM
private void Window_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.LeftAlt || e.Key == Key.RightAlt || e.Key == Key.LeftCtrl || e.Key == Key.RightCtrl || e.Key == Key.RightShift || e.Key == Key.LeftShift)
{
//e.Handled = false;
return;
}
}
This will help you, when the user wants to press Control Key +A , it will do not anything.
In the If condiion, you add others keys windows button... etc.
Hope this helps you.