Since the Alt key will be processed by the system using e.SystemKey , this is the only way to find out if the Alt key is pressed. The Key property will simply return Key.System .
To make sure you always get the right key, you can use this expression:
Key key = (e.Key == Key.System ? e.SystemKey : e.Key);
Matthiasg
source share