0

I have a char, for example 'A'. How I can get KeyValue after which will write this character ('A')?

Thanks for reading, Greetings.

PS: How to obtain the function SendInput large / small letters?

Shadow Wizard Says No More War
  • 64,101
  • 26
  • 136
  • 201
Never
  • 335
  • 2
  • 7
  • 23

1 Answers1

0
[DllImport("user32.dll")]
static extern short VkKeyScan(char ch);

static public Key ResolveKey(char charToResolve)
{
    return KeyInterop.KeyFromVirtualKey(VkKeyScan(charToResolve));
}
Renatas M.
  • 11,468
  • 1
  • 41
  • 60
TOUDIdel
  • 1,253
  • 14
  • 22
  • 2
    -1 for using copy/paste of a previous answer word for word, without giving credit and without providing a link to the question/answer. – AMissico Dec 30 '11 at 18:30