<p>The two key event argument classes <code>KeyEventArgs</code> and <code>PreviewKeyDownEventArgs</code> each have two properties, <code>KeyCode</code> and <code>KeyData</code>, which are both of the enumeration type Keys.</p>

<p>What is the difference between these two properties? Do the values in them ever differ from each other?  If so, when and why?</p>

```
KeyCode
```
is an enumeration that represents all the possible keys on the keyboard.
```
KeyData
```
is the
```
KeyCode
```
combined with the modifiers (Ctrl, Alt and/or Shift).
Use
```
KeyCode
```
when you don't care about the modifiers,
```
KeyData
```
when you do.