I tried the following code, but for some reason the char.IsLetter () method recognizes the following keys as letters
F1, F8, F9, F11, F12, RightShift, LeftShift, RightAlt, RightCtrl, LeftCtrl, LeftWin, RightWin, NumLock.
This method does not seem to be a complete proof of what it considers to be a letter.
if(char.IsLetter((char)e.Key) || char.IsDigit((char)e.Key))
Roburd
source share