Programmatically disable caps lock

后端 未结 2 1728
有刺的猬
有刺的猬 2021-01-18 03:25

I\'m using SendKeys in an automation program for work. I\'ve been plodding along, and am now trying to iron out all the bugs that I\'ve created :-)

One of which, is

2条回答
  •  隐瞒了意图╮
    2021-01-18 03:55

    does this work for you?

        if(Control.IsKeyLocked(Keys.CapsLock))
            SendKeys.SendWait("{CAPSLOCK}This Is An Over Capitalized Test String");
        else
            SendKeys.SendWait("This Is An Over Capitalized Test String");
    

提交回复
热议问题