I am using this Global Keyboard Hook as found here: Using global keyboard hook (WH_KEYBOARD_LL) in WPF / C#
It works great, and I use a little piece of code to handle the keydown event.
private void Klistener_KeyDown(object sender, RawKeyEventArgs e)
{
if (e.Key == Key.Snapshot)
{
MessageBox.Show("Key Pressed!");
}
}
However, any other handlers tied to Key.Snapshot will still work. For instance Windows default for the key will print screen and save it into the clipboard, what if I didn't want any other actions happening after my handler?
I'm not entirely fluent in the Keyboard Hook I am using, but I'm sure there must be a way to implement a e.Handled property or something similar as can be found in KeyEventArgs.
Any ideas how I would go about doing this? Thanks.