C# SendKeys.Send

前端 未结 9 1276
闹比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:38

    I think that the SendKeys.Send("{BS}"); approach will never work (in either order). That's because the original key-pressed/key-released event gets processed after SendKeys.Send is posted. I think you should somehow cancel the key-down/key-up event for the character you want to remove before it is processed by the target window procedure (e.g. notepad's).

提交回复
热议问题