Convert keycode to char/string
I'm trying to convert System.Windows.Forms.Keys to string/char using : KeysConverter converter = new KeysConverter(); string text = converter.ConvertToString(keyCode); Console.WriteLine(text); But it returned "OemPeriod" for "." and "Oemcomma" for ",". Is there any way to get the exact character? Prime_Aqasix This is probably what you really want (bit late, but hope this will help someone else), converting the keycode directly to the character the key prints. First add this directive into your class: [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern int ToUnicode( uint