WPF Keyboard Remapping

Posted by m1dst on Stack Overflow See other posts from Stack Overflow or by m1dst
Published on 2010-03-25T15:54:45Z Indexed on 2010/03/26 14:53 UTC
Read the original article Hit count: 552

Filed under:
|

Hello,

I am trying to remap the input of a textbox. For example. If a user enters a N then I would like to change it to a 9. I thought it might be best to try and catch it in the PreviewKeyDown event although I will also need to process paste attempts (I can solve that bit I think).

Is PreviewKeyDown a good place to start? If so, how do I send the replacement key. I know that e.Handled = true will stop the original key being processed.

Thanks.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about c#