How to identify Key Combinations ?
-
Hello, I was able to identify a key press with a single key by the following code:
public override bool ProcessKeyDown(KeyEventArgs e)
{
if (e.IsRepeat) return false;
if (e.Key == Key.Escape)
{
//do sth
}
}But I was not able to find a solution that also identifies key combinations like: CTRL + arrowup etc. I also did not find anything that wokred with:
KeyEventArgs e
Any hints from your side ?
-
Hello, I was able to identify a key press with a single key by the following code:
public override bool ProcessKeyDown(KeyEventArgs e)
{
if (e.IsRepeat) return false;
if (e.Key == Key.Escape)
{
//do sth
}
}But I was not able to find a solution that also identifies key combinations like: CTRL + arrowup etc. I also did not find anything that wokred with:
KeyEventArgs e
Any hints from your side ?
Try reading the documentation on KeyEventArgs Class[^]. You're looking for the Modifiers property.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak