The two key event argument classes KeyEventArgs and PreviewKeyDownEventArgs each have two properties, KeyCode and KeyData, wh
KeyEventArgs
PreviewKeyDownEventArgs
KeyCode
KeyData
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.