0

Possible Duplicate:
C# How to translate virtual keycode to char?

Basically I have a list of ascii characters that I need to have converted to System.Windows.Forms.Key (for use with PostMessage). And it needs to work no matter what the keyboard/region/locale etc...

I know you can just cast it if it's from A-Z, but nothing else works. Has anyone figured this out?

I'm talking about keys like [, ], <, >, etc... All the non-numeric and non-A to Z.

Thanks!

Josh

Community
  • 1
  • 1
Geesu
  • 5,928
  • 11
  • 43
  • 72
  • The noted duplicate has an answer that describes the `System.Windows.Forms.KeysConverter` class that I believe does what you want, but I'm not 100% sure. – Joe Nov 14 '12 at 00:06
  • You could pinvoke VkKeyScanEx(), pass InputLanguage.Handle – Hans Passant Nov 14 '12 at 00:39
  • It's not a duplicate, unless just a [ is considered a virtual key code? I have a string/char I want, not necessarily a virtual char – Geesu Nov 14 '12 at 01:02

0 Answers0