How to convert KeyEventArgs.KeyCode to what the keyboard is mapped to

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AdrianH
    Recognized Expert Top Contributor
    • Feb 2007
    • 1251

    How to convert KeyEventArgs.KeyCode to what the keyboard is mapped to

    On a KeyDown event, I need to determine what the intended character was to be placed. How does one do this? It is driving me crazy as I do not want to use shift to determine how to map the numbers/symbols since this can change from language to language, keyboard to keyboard. There MUST be some function in Windoze .NET library to do this as to not have such a function would be ludicrous.

    Anyone know what function is needed?

    Thanks,


    A
  • AdrianH
    Recognized Expert Top Contributor
    • Feb 2007
    • 1251

    #2
    Answer is to use the KeyPress not the KeyUp or KeyDown event. KeyPress will give out the key that was pressed including if a deadkey is used (used to add accents to letters).


    A

    Comment

    Working...