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 The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208
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,694
  • 1
  • 43
  • 62
TOUDIdel
  • 1,322
  • 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