C# SendKeys.Send

前端 未结 9 1402
闹比i
闹比i 2021-01-13 01:17

I am running on an issue using C# SendKeys.Send method. I am trying to replace keyboard keys with other keys, for example when I press \"a\" in keyboard I want that key to b

9条回答
  •  忘掉有多难
    2021-01-13 01:40

    I would reverse my calls:

    SendKeys.Send("{BS}");

    SendKeys.Send("S");

    EDIT (After Question Updated):

    If you're working with the string (for your special characters), can you not just capture the string generated by the key press ("a") and modify it by setting the string to the unicode value of the character you're attempting to represent? If the other solutions people have been mentioning aren't working, that's where I'd try next...

提交回复
热议问题